POV-Ray : Newsgroups : povray.advanced-users : Get Euler angles from unit vector? : Re: Get Euler angles from unit vector? Server Time
29 Apr 2024 16:08:14 EDT (-0400)
  Re: Get Euler angles from unit vector?  
From: Le Forgeron
Date: 28 Sep 2018 02:53:23
Message: <5badcfe3$1@news.povray.org>
Le 28/09/2018 à 01:40, Mike Horvath a écrit :
> It would be nice to be able to set vector components like this:
> 
>      #local tPrjB1.z = max(min(tPrjB1.z,1),-1);
> 
> Are there any plans to do this in the future?
> 
> 
> 
> Mike

you could use the following:

#local P = <p.x, P.y, max(min(P.z),1),-1)>;

Make that a set of macro, and voila.

#macro BoundZ( V )
<V.x, V.y, max(min(V.z),1),-1) >
#end

#local P = BoundZ(P);


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.