|
|
CMcCabe wrote:
>
> is it possible to subtract two shapes in a single difference statement?
> as in this:
> difference {
> box1 //the box that is subtracted from
> box2 //box1 has this shape subtracted from it
> box3 //does box3 have this shape subtracted from it as well?
> }//end difference statement
>
> and can anyone point me to a tutorial on csg?
>
> Many thanks for any help,
> CMcCabe
It is easist to think of this way. Box 1 is the only object acted upon
in a csg operation (the first object in a csg operation). In the above
example box 1 will be acted upon by box 2 and box 3 but box 2 will not
be acted upon by box 3.
It is possible to nest csg operations -
difference {
union {
box1
box2
}
box3
}
In the above box 1 and box 2 are unioned together and then differenced
by box 3 so that box 1 and box 2 are both acted upon by box 3.
intersection {
merge {
box 1
box 2
}
box 3
}
In the above box 1 is merged with box 2, and then box 1 and box 2,
are both intersected by box 3. You can use any combination and depth
of csg nesting to acheive the desired shape you are looking for.
POV-Ray tutorials can be found by following this link
http://www.povray.org/links/3D_Tutorials/POV-Ray_Tutorials/
--
Ken Tyler - 1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|