LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Draw a arc with 3 points.

Solved!
Go to solution

I had to rename the .vi from "弧长XY.vi" to XY.vi  - then my english version of labview  is able to open the OPs vi.

0 Kudos
Message 11 of 19
(1,924 Views)

Hi, Thanks for your feedback at first.

Your version is too high for me, could you save as 2014 and post the postion of P,M and Q? so I can check it.

Thanks

Boone

0 Kudos
Message 12 of 19
(1,907 Views)

Thanks for you rename. maybe G05 or arc is better.

0 Kudos
Message 13 of 19
(1,901 Views)
0 Kudos
Message 14 of 19
(1,876 Views)

Well, I didn't notice this post when it appeared 8+ years ago.  But the problem is basically simple to solve, though it involves a bit of math.  Let's start with three points, A, B, C in 3D space, but not on a straight line, so that they form the triangle ABC.  Here's what you do:

  1. Drop a perpendicular bisector from A to BC.
  2. Drop another perpendicular bisector from B to AC.  They meet in a point.
  3. Drop the third perpendicular bisector C to AB.  It is not difficult to prove (but I'll just assert) it passes through the point where the other two perpendicular bisectors intersect.  This point is called the "circumcenter".  
  4. This circumcenter is the center of a circle that will pass through all three points!  You know the center of the circle (from Step 3), and you now know the radius of the circle (it's the distance of the circumcenter to any of the points A, B, or C), so you "know" the circle.

Before trying to solve the difficult problem of finding the circumcenter of triangle ABC that lies in a 3-D space, try to solve the (simpler) problem of ABC lying in the XY plane.  Make it even simpler by putting A at the Origin, B along the X axis, and C in the upper (+Y) half-plane.  Let a, b, and c be the lengths of sides BC, AC, and AB (named for the triangle vertex opposite the side).  Then A is at (0, 0), B at (c, 0), and C at (Cx, Cy), where Cy > 0.  The perpendicular bisector of AB is simply the vertical line whose X coordinate is c/2 (half the distance from A to B).  We know the midpoint of BC, namely 0.5 * (Cx + c, Cy).  The equation for the perpendicular bisector of BC passes through this midpoint and has a slope of (Cx - c)/Cy (do you see how I got that?  Think of the formula for slope, delta y / delta x.  Interchanging X and Y amounts to a rotation by 90°).  Use this to form the equation for the perpendicular bisector of BC and see where it equals c/2.  This should be the coordinates of the circumcenter. 

 

If you really want to be sure, do the same messy equations for side AC, and see that (I hope) you get the same intersection with the perpendicular bisector of AB at c/2.

 

OK, now you know the center of the circle.  What is its radius?  Simple, just the length of the line from the origin (0, 0) to the circumcenter, whose coordinates you just computed.

 

If you are really a glutton for punishment and want to do the 3D case, here's what I'd do:

  • Through a combination of one translation (to put A at the origin) and three rotations about Y, Z, and X, put B on the +X Axis and C in the +Y half-plane.
  • Solve for the circumcenter.
  • Transform back to the original coordinate system by "undoing" the above transformations, but in the reverse order.  This is a good place for using LabVIEW's Matrix operations.  Experience with Spherical Polar Coordinates is also quite helpful.

Bob Schor

Message 15 of 19
(1,864 Views)

Thank you. If I have time, I will study.

0 Kudos
Message 16 of 19
(1,855 Views)
Solution
Accepted by topic author Boone301

Hi,

Thanks for your feedback.

I have fix the bug.

It should be PM*MQ

Thanks

Boone

Message 17 of 19
(1,831 Views)

Very good, and probably correct when tested

0 Kudos
Message 18 of 19
(1,814 Views)

Ok,if find some bug, please send me a message

Thanks

Boone

0 Kudos
Message 19 of 19
(1,786 Views)