POV-Ray : Newsgroups : povray.general : vrotate question : Re: vrotate question Server Time
20 Apr 2024 02:43:39 EDT (-0400)
  Re: vrotate question  
From: m@b
Date: 21 Jul 2022 11:52:05
Message: <62d97625$1@news.povray.org>
On 21/07/2022 3:25 pm, jr wrote:
> hi,
> 
> reading the reference for 'vrotate()'[*], I understood that all components of
> 'B' are used to rotate the point.  yet, with the code below, both points are
> identical for a given 'i_'.  I expected different values of 'B' to result in
> different "orbits", so, what am I doing wrong?
> 
> [*] <https://wiki.povray.org/content/Reference:Vector_Expressions#Functions>
> 
> 
> regards, jr.
> 
> -----<snip>-----
> #version 3.7;
> 
> global_settings {assumed_gamma 1}
> box {0,1}
> 
> #for (i_,0,359)
>    #local p1_ = vrotate(<5,0,0>,<0,i_,45>);
>    #local p2_ = vrotate(<5,0,0>,<45,i_,45>);
>    #debug concat("#",str(i_,0,0)," p1 <",vstr(3,p1_,",",0,6),">.\n")
>    #debug concat("#",str(i_,0,0)," p2 <",vstr(3,p2_,",",0,6),">.\n")
> #end
> -----<snip>-----
> 

vrotate(<5,0,0>,<45,i_,45>);

You moved the point along the x axis then rotated it by 45 degrees in x.
The 45 degree rotation has no effect as the point is still at y = 0, z = 0


Post a reply to this message

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