Quote:
Originally Posted by DampRobot
Ether,
I'm not a programmer, but I love a good geometrical challenge.
The equations I came up with were: (r-h)sin(l/2r)=x/2 and 2rsin(l/2r)=(x^2/4+h^2)^1/2
where r was the radius of the curve, h was the height specified in your diagram, l was the length of the curve, and x was the length of the chord. To find the numerical solution, input values for l and x, and solve for h or r.
Was the "challenge" to write a program that found the solutions of these functions through guess and check? Or did I come up with a different solution? Plugging in the values on this thread with my trusty graphing calculator, I got a reasonable approximation of the answers posted on this thread.
|
Even getting a reasonable approimation is good enough, because there is no exact answer. I simplified until I ended up with a formula that looked something like this:
sin (theta/2) = (theta * Arc) / (2 * chord length)
With theta being the angle inside the two radii that would have gone from the center of the circle to the end of the cords.
That can only be solved iteratively, graphically, or by a lookup table (for those of us who remember not having calculators....)
Once you have theta, the height is trivial.