LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create using two points and a radius

I'm trying to figure out a way to create an arc between to points on a graph if I know the radius of the arc and the center of the arc. Can anyone help shed some light?
0 Kudos
Message 1 of 4
(2,611 Views)
So far I can draw a circle but I cant remove what I dont need.
0 Kudos
Message 2 of 4
(2,608 Views)

You do not have to remove anything, simply do not create the unnecessary points.  The easy way is to control the start and stop points of your ramp.

 

 

0 Kudos
Message 3 of 4
(2,598 Views)

The trick is not to remove what you don't need, but to only plot what you do need!  What you need to create are some X,Y pairs that are on your arc, and then plot them as a series of X,Y points.

 

Let's assume that the center of the circle is the origin (0, 0).  If it is not, simply add the X, Y coordinates of the center to all of the points we are going to calculate.  Let's also assume the initial angle to the first point is 0 (it is on the X axis), and the final angle is A (again, can add values to "adjust" these assumptions).  Suppose you want N points on the arc.  Compute the following X-Y pairs (use a For loop):  cos (Ai/N), sin(Ai/N)  where i is the index of the For loop.  When you plot these, you'll have an arc of unit radius.  [Multiply these values by the desired radius R].

 

0 Kudos
Message 4 of 4
(2,594 Views)