LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the circle to draw a rectangle rather than a line?

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.

 

0 Kudos
Message 21 of 32
(1,218 Views)

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?

0 Kudos
Message 22 of 32
(1,211 Views)

anyone got any ideas?

0 Kudos
Message 23 of 32
(1,192 Views)

@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...)

0 Kudos
Message 24 of 32
(1,186 Views)

Changing the code that you helped me with? or to a different part of the code

0 Kudos
Message 25 of 32
(1,184 Views)

im not having trouble drawing the shape just making it connect to the same graph. 

http://gyazo.com/208c1ae4d236b502f94ea8c584725931

0 Kudos
Message 26 of 32
(1,183 Views)

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.

0 Kudos
Message 27 of 32
(1,177 Views)

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

0 Kudos
Message 28 of 32
(1,174 Views)

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)

 

0 Kudos
Message 29 of 32
(1,168 Views)

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?

0 Kudos
Message 30 of 32
(1,156 Views)