|
![](/i/fill.gif) |
"Maarten" <m44### [at] yahoo com> wrote in message
news:web.45620c89733899c6ab0f85860@news.povray.org...
> Hi,
>
> Is it possible to do transformations (basic rotate, scale, translate) on a
> vector and then print out the result? e.g. something like
>
> #warning <1,0,0> rotate z*90
>
> I would like to use this to calculate the lowest point of my object, so I
> can lower it to the ground. Other solutions to this problem are also
> welcome.
>
> Thanks!
> Maarten
>
Hi Maarten,
The function vtransform() applies a transformation to a vector, returning a
vector that you could write out into the message stream e.g.
#declare MyVector = vtransform(Vect, Trans);
#debug concat(vstr(3,MyVector,",",3,3)"\n")
To get the distance between the lowest point of the object and the ground
you could use
#declare LowestPoint = min_extent(OBJECT_IDENTIFIER);
#declare DistanceToGround = LowestPoint.y - GroundElevation;
I didn't test any of these examples, so there may be syntax errors to fix.
Regards,
Chris B.
Post a reply to this message
|
![](/i/fill.gif) |