|
|
"Kontemplator" <haf### [at] yahoocom> wrote:
> Thanks a lot, after hours of waiting I got it. My math fails in calculating the
> exakt radius of the sphere at the intersection point with the plane
Your radius in a plane varies as the sin of the angle.
The angle is a function of the distance away from the center as you travel
perpendicular to that plane, from the edge of the sphere in the direction of the
center. Specifically the arc-cosine.
So, you start off at the radius r, and move r-d.
The cosine of an angle is adjacent/hypotenuse.
your r-d is the cathetus, or adjacent edge, and the radius is the hypotenuse.
so theta is acos (r-d, r)
to get the remaining cathetus, or opposite edge, you need to calculate the sin
of that angle
sin theta = opposite/hypotenuse
so sin (acos (r-d, r)) = opposite/hypotenuse
multiplying both sides by the hypotenuse (r) gives you the length of the
cathetus, which is the radius of the circle you're looking for (r2)
#declare r2 = r * sin (acos (r-d, r));
Post a reply to this message
|
|