POV-Ray : Newsgroups : povray.general : Inverse of vrotate? : Re: Inverse of vrotate? Server Time
26 Apr 2024 01:36:57 EDT (-0400)
  Re: Inverse of vrotate?  
From: dick balaska
Date: 11 Mar 2018 01:19:29
Message: <5aa4ca71$1@news.povray.org>
On 03/10/2018 11:53 PM, Mike Horvath wrote:
> I am not getting the results I want.

> #declare light_source_location    = vrotate(<0,0,-1>, <-060,-060,+000>);

You know that this statement always gives a vlength(1) vector? (<-1,0,0> 
or <0,1,0>) It's going to be real close to the origin. I'm thinking 
that's not what you want.

Are you trying to move a light on a curve between two points?  That is a 
different thing than I presented.

> The input and output angles do not match.

They wouldn't with my formula.  y is always 0. It's confusing to eyeball 
"How can y be 0 when I'm clearly rotating 90 degrees around y". But 
twiddling x/z gets you to the same place.

> 
> I would also rather omit the z angle in the result, so that there is 
> only rotation around the x and y axes.

You can build it as two separate x,y rotations if you know how to 
degrees(atan2(V.y, V.z))

> 
> 
> Mike


-- 
dik
Rendered 920576 of 921600 pixels (99%)


Post a reply to this message

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