|
|
"Greg M. Johnson" wrote:
>
> Easy, cinch, unless your object is a BLOB!
>
> #declare MyObject = .....................
>
> #declare location= <0,0,0>+max_extent(MyObject)/2+min_extent(MyObject)/2;
>
> Tada! Won't work with blobs.
>
min/max_extent only give the limits of the object's bounding box, and thus are
not foolproof with complex CSG either, most notably intersection.
Vector functions are the surest way to go, since every object transformation can
be represented with a vector function.
Furthermore, in MegaPov there is now a vtransform() function, the vector
equivalent of transform. This makes the required operation easy:
#declare T=transform{rotate ... translate ... etc}
#declare Object=sphere{<0,1,0>,1 transform T}
#declare Location=vtransform(<0,1,0>, T);
--
Margus Ramst
Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Post a reply to this message
|
|