Hi dtrbc
The following script defines a rotation using quaternions, without a RPY conversion (I did not write this):
float $speed;
$speed=-.5;
$orientation = (sin($speed*time),0,0,cos($speed*time));
Adjusting the $speed variable alters the speed (obviously), and the rotation axis can be changed by changing which of the first 3 quaternion values are affected by the "sin" function. For example, the script below rotates in a different axis to the one above:
float $speed;
$speed=-.5;
$orientation = (0,sin($speed*time),0,cos($speed*time));
I have to admit that I struggle a bit with the quaternion concept, but this script does the job nicely and that's all I really care about!!
EDIT: This basic script can be modified to get different effects. For example, I wrote the script below for a Solar system model, which I wanted to run at a certain speed for a given time, and subsequently accelerate for the remainder of the animation:
float $speed;
float $trigger;
float $rate;
$speed=0.004155;
$trigger = max(time, 29);
$rate=($trigger*3.5)-100.5;
$orientation = (0,sin(($speed*$rate*$rate*time)+2.5),0,cos(($speed*$rate*$rate*time)+2.5));
The $speed variable sets the initial speed of rotation (in this case it's Mercury's orbit I think); the $trigger variable is either the time, or a preset figure, whichever is higher, which sets the trigger time for acceleration; and the values in the $rate calculation were chosen so that $rate would equal 1 for the initial period, and increase in a linear fashion thereafter. Since $rate is squared in the $orientation calculations the result is an acceleration. The values of "2.5" in the $orientation calculation set the starting rotation of the object being affected by this script.
ANOTHER EDIT: Wouldn't the gimbal lock effect be negated if RPY adjustments were always relative to the object itself, rather than to the "universe"? In one of the links above was an aeroplane example to explain gimble lock, where if the plane were to climb 90 degrees to horizontal then roll and yaw would be the same motion. However, a real aeroplane experiences no such "gimbal lock", because it's frame of reference moves with it. Pitch, roll and yaw are always relative to the plane itself, not the Earth. Hmm, my understanding of the guts of 3D modelling is limited to say the least, so perhaps the ability to choose the reference frame within which an object rotates is not feasible.