POV-Ray : Newsgroups : povray.binaries.animations : object rotations in 2 axes vs. 3 : Re: object rotations in 2 axes vs. 3 Server Time
18 May 2024 11:26:27 EDT (-0400)
  Re: object rotations in 2 axes vs. 3  
From: Stephen
Date: 5 Oct 2018 05:59:54
Message: <5bb7361a@news.povray.org>
On 04/10/2018 17:07, Kenneth wrote:
> But to my eyes, it looks like the LH dice has 3-axes(!), and the RH dice*maybe*
> has only two(?). I'm seeing the LH dice 'reverse rotation' every now and then.
> 
> Could you post the respective clock rotations for both? I'd like to try them
> out.
> 
> Did you use
> rotate <x,y,z>?
> 
> Or something like
> rotate...
> rotate...
> rotate...
> 

Your wish is my command. :-P

/////////////////  Sums  /////////////////////////

#declare  sky_sphere_rot = clock * -45; // Sky moves not the dice.
#declare  Die_X_rot  = clock * -1440.0 ;
#declare  Die_Y_rot  = clock * -720.0 ;
#declare  Die_Z_rot  = clock * -45.0 ;



////////////////////////////////////////////////



sky_sphere {  // SkySphere1
   pigment{ Shadow_Clouds_Top }
   pigment{ Shadow_Clouds_Mid }
   pigment{ Shadow_Clouds_Bot }

   rotate    <sky_sphere_rot,0.000,0.000>
}  // end SkySphere1

union {  // Dice__1
   object {  // Reference2
     Dice__Dice_Mat_0
     material{ Dice_Mat_0 }
     hollow
   }  // end Reference2

   object {  // Reference3
     Dice__Dot_Mat_0
     material{ Dot_Mat_0 }
     hollow
   }  // end Reference3


rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>


   translate <2.000000,0.000000,0.000000>
}  // end Dice__1

union {  // Dice__0
   object {  // Reference0
     Dice__Dice_Mat_0
     material{ Dice_Mat_ }
     hollow
   }  // end Reference0

   object {  // Reference1
     Dice__Dot_Mat_0
     material{ Dot_Mat_ }
     hollow
   }  // end Reference1

rotate <Die_X_rot, Die_Y_rot, 0>
   translate <-2.000000,0.000000,0.000000>
}  // end Dice__0





> ?
> 
> To your point about the ratios: Just conjecturing, I would say that keeping the
> rotations to set ratios (whatever thay may be) in order to get smoothness in the
> result, sounds like invoking "special rules"-- 

Yip.

> when the original cause of the
> rotations (the original impinging force in the 'real world') may not be so
> accomodating;-)   The original applied vector force may have wildly different
> ratios for its 3 de-composed axis-aligned forces-- naturally resulting in
> different ratios between the 3 POV-ray rotation amounts. (OR two final rotation
> amounts, re: Euler???)

Looking into this in a desultory fashion, I found two new terms. Gimbal 
lock and Quaternion.

I found the links on the first reply helpful in understanding the problem.

https://blender.stackexchange.com/questions/47545/when-should-i-use-quaternion-wxyz-and-how-should-i-handle-the-w-quaternion-rot

And I now know that Euler is pronounced Oiler. :-)


-- 

Regards
     Stephen


Post a reply to this message


Attachments:
Download '0001-0600.mp4.mpg' (646 KB)

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