12-05-2013 11:09 AM - edited 12-05-2013 11:09 AM
Well, to draw an equilateral triangle, the outer loop has only 3 iterations and you rotate the direction 120 degrees between segments.
Also, drawing a circle is trivial using complex numbers. Here's how you make a circle.
12-05-2013 11:15 AM
im not wanting to create a triangle i already have i want to take out the code i was previoulsy using in the attachment below and add in the code you help me to create to draw the rectangle.
if that makes sense?
12-05-2013 12:28 PM
anyone got any ideas?
12-05-2013 12:40 PM
@recneps wrote:
anyone got any ideas?
Yes.
Try to make the code universal so you only need to enter the side length and number of corners. Very little change needed.
(Posting by phone. No computer here...)
12-05-2013 12:44 PM
Changing the code that you helped me with? or to a different part of the code
12-05-2013 12:48 PM
im not having trouble drawing the shape just making it connect to the same graph.
12-05-2013 01:34 PM
Why are you turning it into a 3D array using autoindexing?
If you want the dot to move, the graph terminal belongs inside the inner loop.
12-05-2013 01:39 PM
are you on you computer now or still on your phone? i can send you what i have done so far so you can see for yourself what ive done so far and have a mess about with it
12-05-2013 02:18 PM - edited 12-05-2013 02:20 PM
OK, as a fisrt step, you need to simplify!
Here is a simple code that graphs a circle permanent and traces a polygon with any number of sides using a moving dot.
(It is NOT complete. You still need to tweak the starting positions and segment sizes with respect to the circle, but that's just simple math. :D)
12-05-2013 03:04 PM
is this a step that needs to be done so that i can put it with all the other code for the circle and triangle so that it plots it on one graph or is this a different exercise?