Grasshopper

generative modeling for Rhino

# How to fit an arc of pre-determined length through 2 points?

Hi, does anyone know of a solution for this:

Given point A and B and the length of an arc (s = 10). How do you find the center point of the arc (x,y) and its radius r? i.e. how to fit an arc with a pre-determined length through 2 given points?

Feels like it should be a very simple solution.

Views: 332

### Replies to This Discussion

hi,

you have to find a solution for
Sin (r * PI/s) - AB / (2*r)

while AB represents the Distance between A and B.
I don't know how this is mathematically possible, but you can do it manually. adjust the radius until the equation is nearest at 0.

best regards
laur

Attachments:

It seems as though maybe one more known value would help.

http://mathworld.wolfram.com/CircularSegment.html

Until you find an analytic solution, here's a Galapagos one. I made it so it only works in the World XY plane, in 3D you'll always have an infinite number of solution rather than just two.

--

David Rutten

david@mcneel.com

Attachments:

Hi all,

Thanks for the help. I thought an answer could be found analytically, but these solutions work well too.

by Alex

by Alex

by Alex

by Alex

• View All