04-29-2010 11:34 PM
Hello,
I am creating a vi that graphs a circle from a certain interval, so like pi/3 to 2pi. I am using the sin and cos function. How can I graph these partial circles?
Thanks
Chod
Solved! Go to Solution.
04-30-2010 01:42 AM
04-30-2010 02:54 AM
Hi Chod,
you can use an x-y-graph or you can draw the circle on a picture control.
Mike
04-30-2010 03:19 AM - edited 04-30-2010 03:21 AM
04-30-2010 06:39 AM
04-30-2010 08:09 PM
Here is kind of what I need, although I need to be able to have a control for when to start and end the angle. I want two controls on the front panel, so when I graph it I can display any segment of the unit circle.
Thanks,
Chod
04-30-2010 10:06 PM - edited 04-30-2010 10:08 PM
Your For Loop just creates an array that has N of the same value.
Take a look at this.
04-30-2010 10:25 PM
Awesome thank you! One more question about that. How do I start the circle at (1,0)?
04-30-2010 10:27 PM
04-30-2010 10:59 PM
I just happened to go with the way you wired up the sin/cos function. Looking at it more closely now, you had the output of sin going to X and cos to Y. That's backwards from normal trigonometry.
Swapped the wires so that the Sine goes to the Y input and the Cosine goes to the X input, then you'll have it start at the right hand side (3 o'clock, (1,0) point) and it will go counter -clockwise.
Also, if you want to the center to be a different location, then you'll just have to add the new center point (currently 0,0) to the results of the sine and cosine function.