POV-Ray : Newsgroups : povray.binaries.scene-files : quaternions.inc (fixed) : quaternions.inc (fixed) Server Time
2 Sep 2024 00:13:28 EDT (-0400)
  quaternions.inc (fixed)  
From: None
Date: 8 Oct 2003 10:37:44
Message: <Xns940E6C1F42D3FNone@204.213.191.226>
I've fixed quaternions.inc so that you shouldn't get the warnings any 
more.  And I've made changes thanks to Tor Oval Kristenen's suggestions.

I realise that the include was meant almost exclusively for script 
writers , so I added a sample macro for a regular object modifier.  More 
could be made like this taking advantage of quaternions.


    	RotSimulXYZ(Angles)    	// In Degrees!

It will rotate an object along the three axes XYZ using Euler angles 
simultaneously (all at the same time).  So it's like a rotate but it 
doesn't suffer from Gimbal Lock.

ex.:
    	object ( Basketball
    	    	RotSimulXYZ(<90,0,90>)
    	}

I still prefer Radians, myself, since Radians apply direclty to the 
radius of an object and how much it should rotate, but I made it degrees 
here to remain consistent with regular Povray transforms.


Post a reply to this message


Attachments:
Download 'quaternions.inc.txt' (7 KB)

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