POV-Ray : Newsgroups : povray.pov4.discussion.general : A dream about POV4 : Re: A dream about POV4 Server Time
28 Apr 2024 08:26:35 EDT (-0400)
  Re: A dream about POV4  
From: scott
Date: 16 Apr 2009 05:56:52
Message: <49e700e4@news.povray.org>
> Sure, "rotate 30*<1,1,0>,45" or even "rotate <1,1,0>*30,45" would be fair 
> values
> (though it doesn't actually make sense to scale a vector when you just 
> want to
> rotate around it...)

The rotate keyword is just wrong anyway, it is not obvious what the result 
will be (does it do x first or z first?).  You also can get the "gimbal 
lock" problem with specifying rotations this way.

A new rotate keyword could either take a single vector (for 3.x 
compatibility), or take a vector and a scalar (to rotate a certain amount 
around that axis).  Then all of the following would be valid:

rotate y*45
rotate <0,45,0>
rotate <1,1,0> * 45
rotate <1,1,0> , 45  // new syntax, rotate 45 degrees about the axis
rotate y,45          // new syntax, rotate 45 degrees about the axis

Anyway, I assume in POV4 "rotate" will just be a macro that generates a 4x4 
transformation matrix, it should be easy to update/modify later without 
recompiling the source.  You could even add a rotate macro that takes a 
quaternion as a 4-element vector.


Post a reply to this message

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