POV-Ray Insert Menu
mady by Christoph Hormann
http://www.imagico.de/

trace

top previous next

// trace function tests for intersection with a specified object

#declare Obj = sphere { 01 }
#declare Norm = <000>;
#declare Start = <0.50.51>;
#declare Pos = trace (
                  Obj,             // object to test
                  Start,           // starting point
                  -z,              // direction
                  Norm );          // normal

// if intersection is found, normal differs from 0
#if (Norm.x != 0 | Norm.y != 0 | Norm.z != 0)
 //...
#end