POV-Ray : Newsgroups : povray.binaries.images : it's not about photons... : Re: it's not about photons... Server Time
6 Nov 2024 22:12:45 EST (-0500)
  Re: it's not about photons...  
From: Bald Eagle
Date: 7 Jan 2018 12:30:06
Message: <web.5a52586f7e154b365cafe28e0@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.