|
|
On Tue, 29 Jan 2002 16:04:39 -0600, "majucatur" <maj### [at] yahoocom>
wrote:
>I have a little problem, Someone knows how the CSG works?, mathematically, I
>am interested in the algorithm that determine what object is product of the
>CSG construction and how can I develop a CSG raytracing system. I was
>"reading" the POV sourde files, but with all that modules i got confused.
Simple. Get all ray-shape intersections from all objects in the CSG,
depth-sort them, then get the first one that is contained inside all
objects of the CSG except the one it belongs to. That's your
intersection point with the CSG. The normal at this point is the
normal of the object the intersection belongs to, flipped if
necessary.
For this to work, all objects should have an Inside(Point) method, an
All_Intersections(Ray) method and a Normal_At(Point) method, or the
equivalent functionality in the language you're coding in.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|