LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire coordinates of an arc

Hi all,
 
I'm trying to acquire the co-ordinates between two points of an arc, into an array. I  know the coordinates of the start  and   end point and the  radius of the arc. I want  to acquire all the coordinates between these points and  put  in  an  array. I  have  attached  the  picture of what i want to do. Please help me out.
 
Regards,
Giridhar Rajan
Automation Engineer
Cruiser Controls
Mumbai, India
0 Kudos
Message 1 of 11
(4,850 Views)
If you have two points and a radius, you will have zero (2*radius<distance between points), one (2*radius=distance), or two circles that match. Since there is an infinite number of coordinates on the arc, you must limit yourself to a finite number of coordinates (e.g. 100 equally spaced points).
 
Typically you'll have two solutions for the circle, and two possible arcs for each solution, so which one of the four do you pick? (see picture for possible arcs given two points and a radius)
 
Can you provide more details on the problem? Do you have some example data?

Message Edited by altenbach on 12-27-2005 01:09 PM

Message 2 of 11
(4,839 Views)

Hi,

I want to draw ARC2 as a priority, but it  will be great if I can choose which arc to draw using an enum control.

Regards,

Giridhar Rajan

Automation Engineer

Cruiser  Controls

Mumbai,  India

0 Kudos
Message 3 of 11
(4,824 Views)
Hi Giridhar,

Your question is more a solving issue than a LabVIEW specific question.You can use the expression for a circle to find the coordinates for the centers of the two circles that Altenbach mentions. The expression for a circle is

R^2 = (x-a)^2+(y-b)^2

where R is the radius of the circle and (a,b) is the center of the circle.

After finding the center of the circle that the arc is part of, you should be able to calculate the arc as the coordinates between the two points.

What heve you done so far? Are you getting stuck with anything specific to LabVIEW?
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 11
(4,790 Views)
To avoid all the ambiguity of multiple solutions, it might be easier to define the start and end points PLUS one point lying on the arc. Three points uniquely define a circle and the solution to the problem is trivial. 🙂 There will always be exactly one solution!
 
Attached is a draft of a simple demo (LabVIEW 7.0) that does just that.
 
I am sure you could easily generate "point three" from your desired "radius + endpoints" and re-use most of my code, with the problem that there will be zero, two or four solutions depending on the inputs.
 
Note that I use mostly complex math to avoid explicit trigonometric functions. Let me know if you have questions. 😄
 

Message Edited by altenbach on 12-30-2005 11:12 AM

Download All
0 Kudos
Message 5 of 11
(4,782 Views)
Just on a side note:
 
If you have LabVIEW 8.0, things get quite a bit nicer, for example:
  1. We have events for "cursor move", thus we don't need to constantly poll the cursors.
  2. xy graphs draw complex data directly in the complex plane (real=x, imaginary=y).

Message Edited by altenbach on 12-30-2005 01:08 PM

Message 6 of 11
(4,765 Views)

Hi altenbach,

Your VI was amazing. But frankly, I could not understand the logic. I modified your VI to make a simple interface. Please find the vi attached. But I want one slight modification in this. I want the user to enter the radius of the arc.

Regards,

Giridhar Rajan

Automation Engineer

Cruiser Controls

Mumbai, India

0 Kudos
Message 7 of 11
(4,749 Views)
Your modification assumes that the center of the circle is a (0,0). This does not agree with the figure in your first attachment.
0 Kudos
Message 8 of 11
(4,746 Views)

ya thats correct, but origin as centre  will  do for me now. But how make to  user enter the radius?

Regards,

Giridhar Rajan

Automation Engineer

Cruiser Controls

Mumbai, India

0 Kudos
Message 9 of 11
(4,745 Views)
If you assume the center at the origin, you'll most likely won't find a solution. Notice that in your modification your arc will only go through one of your two points, you're throwing away the "r" part of the other one and only retaining the angle. Your system os overdetermined. 
 
In this case you might as well throw both away and turn the R indicator into a control. 😮
 
Why don't you define the arc from e.g. "center+radius+direction1+direction2"?
0 Kudos
Message 10 of 11
(4,738 Views)