|
|
Wade wrote:
>
> Thank you Francois for cleaning my code up. I've a question though: why did
> you remove the inverse?
>
> Wade
It really doesn't matter as you're not doing CSG or media, but a shape
without the inverse has the interior inside the limits of the shape. By
putting "inverse", you fill your universe with the shape EXCEPT inside
the limits of the shape.
Render the following example to see the difference:
//---8<---8<---8<---8<---
#include "colors.inc"
intersection{
box{ < -5, 0, -2 > < -1, 4, 2 > }
sphere{ < -3, 2, 0 > 2.5 }
texture{ pigment{ color Blue } }
}
intersection{
box{ < 1, 0, -2 > < 5, 4, 2 > }
sphere{ < 3, 2, 0 > 2.5 inverse }
texture{ pigment{ color Red } }
}
light_source{ < 10, 10, -10 > color White }
camera{ location < 0, 2, -10 > look_at < 0, 2, 0 > }
//---8<---8<---8<---8<---
As you can see, the shape that is defined by the blue sphere is inside
the surface, whereas the shape defined by the red one is the outside.
--
Francois Labreque | Unfortunately, there's no such thing as a snooze
flabreque | button on a cat who wants breakfast.
@ | - Unattributed quote from rec.humor.funny
videotron.ca
Post a reply to this message
|
|