|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Maarten" <m44### [at] yahoocom> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Maarten wrote:
> 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
Check out vrotate, one of the available vector functions:
<http://www.povray.org/documentation/view/3.6.1/229/>
Further, check out vstr, one of the available string functions:
<http://www.povray.org/documentation/view/3.6.1/232/>
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
> Maarten wrote:
> > 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
>
> Check out vrotate, one of the available vector functions:
> <http://www.povray.org/documentation/view/3.6.1/229/>
>
> Further, check out vstr, one of the available string functions:
> <http://www.povray.org/documentation/view/3.6.1/232/>
>
> Thorsten
Chris and Thorsten:
Thanks a lot, both of you!
This is exactly what I needed. (Also thanks to POV for supporting it :))
Regards,
Maarten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|