Sam Jones Posted May 7, 2017 Share Posted May 7, 2017 For you trig and/or vector experts, how can I compute the radius of an arc formed from 3 points? Anyone?Many TIA,Sam Jones Quote Link to comment
MullinRJ Posted May 7, 2017 Share Posted May 7, 2017 Hi Sam, Manually? Draw lines between points 1&2, and between 2&3. Rotate each line 90° (CMD-L). Extend the lines until they intersect. That is the center of the arc through those 3 points. Measure the distance from the intersection point to any one of the original points. That is your radius. Do you need an answer in script form? Raymond Quote Link to comment
Sam Jones Posted May 7, 2017 Author Share Posted May 7, 2017 Raymond, your the man! Yep, answer in script form. I wasn't sure what would be possible, since not all 3 point collections form an arc. An approximation will work just fine. Quote Link to comment
MullinRJ Posted May 7, 2017 Share Posted May 7, 2017 Almost done with the script. As far as I know, the only set of 3 points that do not form an arc are 3 collinear points, unless you are willing to entertain arcs with infinite radii. Back shortly with a script... I guess now is a good time to ask, "Are you looking for a 2D solution, or one for 3D?" Raymond Quote Link to comment
Sam Jones Posted May 7, 2017 Author Share Posted May 7, 2017 2D. This is for plan view light plots. A 3D solution would be interesting, but I do not foresee a need. Interesting in that they would form a working plane and the solution would be on that plane. That would confuse my current need, but interesting. Quote Link to comment
Sam Jones Posted May 7, 2017 Author Share Posted May 7, 2017 "As far as I know, the only set of 3 points that do not form an arc are 3 collinear points" ! I thought that would be the case, but I drew some weird configurations that I thought would not work. I just tested your manual solution. Wow. Who knew? Well I guess everyone who did better in high school math knew. I wish my trig and geometry instructors had been a little more creative in their assignments. When I started drafting 20, no 30, no 40 years ago, I had to start re-teaching myself trig and then even geometry. I was fairly successful, but some of the holes are pretty gaping. Thanks again. S Quote Link to comment
JBenghiat Posted May 7, 2017 Share Posted May 7, 2017 There's also ThreePtCenter(), and then get the distance between the center and one of the points. -Josh Quote Link to comment
MullinRJ Posted May 7, 2017 Share Posted May 7, 2017 Sorry Sam, I ran out of time. If no one posts a script by the time I get back, I'll finish mine. The hard part is determining whether to turn left or right at the first turn. Raymond Quote Link to comment
DomC Posted May 11, 2017 Share Posted May 11, 2017 (edited) Hi Sam Can it be a python script? #Python Script. Returns connecting radius from 3 selected points pts = []; h= vs.FSActLayer() for i in range(3): #Get the first 3 selected objects pts.append(vs.GetLocPt(h)) h = vs.NextSObj(h) c = vs.ThreePtCenter(*pts) d = vs.Distance(c[0], c[1], pts[0][0], pts[0][1]) vs.AlrtDialog('Your Radius is '+str(d)) vs.ArcByCenter(c[0],c[1],d,360,360) If you are more familiar with pascal syntax than me: ThreePtCenter() and Distance() should do the job Edited May 11, 2017 by DomC Quote Link to comment
MullinRJ Posted May 12, 2017 Share Posted May 12, 2017 Dom, In Sam's original post he said he wanted the RADIUS of an ARC formed by 3 points. Your solution provides a CIRCLE through those points. With my inability to read things precisely the first few times through, I thought he also wanted the ARC defined by those points. I finally finished a script that returns the ARC that starts at the 1st point, proceeds through the 2nd point and ends at the 3rd point. If Sam doesn't need it, maybe somebody else will. I should have quit with the RADIUS solution. Here's a VW 2014 file with my script loaded in a script palette. Arc By 3 Points v2014.vwx Run the script and click in the drawing 3 times to provide 3 points. The script will draw the ARC passing through those points and place 2D Loci at the three click points and at the arc's center, then it will wait for you to click 3 more times for another arc. To end, press the ESC key or click 3x in the same place. If anyone can find a way to simplify this solution please post back here. Raymond Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.