POV-Ray : Newsgroups : povray.general : Question for the Gurus : Re: Question for the Gurus Server Time
12 Aug 2024 17:17:39 EDT (-0400)
  Re: Question for the Gurus  
From: Ronald L  Parker
Date: 30 Jan 1999 14:40:37
Message: <36b45e38.9973722@news.povray.org>
On Sat, 30 Jan 1999 09:07:31 -0800, Ken <tyl### [at] pacbellnet> wrote:

>  As I understand CSG operations when you intersect an object
>or group of objects, let's keep it simple and say a sphere
>intersected by a plane, the intersecting object adds it's
>properties to the object being intersected.

This is roughly correct.  I always find that it's easier
to visualize it exactly the way the code does it: a "face" 
of an object appears in an intersection if it is inside of 
every other object in the intersection, with the exception 
of the object it belongs to, of course.  All faces keep
whatever textures are assigned to them.  But I don't expect 
this to be clear to anyone else. :)

>  A sphere clipped by a plane will become hollow while a
>sphere intersected by a plane will have the surface of the
>plane added to the area bounded by the circumference of the
>sphere.

Another way to think of it is to say two objects that are
intersected are clipped_by each other.  That is,

intersection {
  plane {y,0 pigment {color Red}}
  sphere {y,2 pigment {color Blue}}
}

is roughly equivalent to

  plane {y,0 pigment {color Red} clipped_by {sphere{y,2}}}
  sphere {y,2 pigment {color Blue} clipped_by {plane{y,0}}}

>Certainly we are allowed to #declare an object without a pigment.
>We may use that object inside another #declared union of objects.
>And when the final #declare object, now a group of objects, is
>used the pigment and other material properties may be added.
>But it can also be accomplished at the individual object level.
>So there should be no difference. Or should there ?

There is a caveat: if a child of a CSG operation already has a
texture, it won't be affected by any texture that's applied to the
CSG object as a whole.


Post a reply to this message

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