POV-Ray : Newsgroups : povray.binaries.animations : object rotations in 2 axes vs. 3 Server Time
5 May 2024 01:57:00 EDT (-0400)
  object rotations in 2 axes vs. 3 (Message 21 to 30 of 46)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Stephen
Subject: Re: object rotations in 2 axes vs. 3
Date: 4 Oct 2018 13:38:43
Message: <5bb65023@news.povray.org>
On 04/10/2018 17:07, Kenneth wrote:
> Stephen <mca### [at] aolcom> wrote:
>>>
>> Well here is my tuppence worth.
>> I think that it is the ratio of the rotations that makes 3 axes look
>> odd. in this animation the X axis rotates 3 times for one rotation of
>> the Z axis and the Y axis rotates twice.
> ......
>> The LH dice is rotating on 2 Axis, X&Y the RH one in all three.
>>
> 
> I have to admit that they do look 'smoother' than mine.
> 
> 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.
> 

Ah! you spotted the deliberate mistake. Oops! :-(

You are right. Well spotted. :-)

> 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...
> 
> ?
> 

rotate <x,y,z>
But I created it in B3D which generates a separate pov file for each 
frame (like Moray did) so I did not use the "clock" variable. When I do 
modify a static file into an animation I don't use "clock" but 
"frame_number.


> 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"-- when the original cause of the
> rotations (the original impinging force in the 'real world') may not be so
> accommodating ;-)  

True but that is why I mentioned that I try to make cyclic animations. 
Quite unrealistic in the real world.


> 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???)
> 

My thoughts were that the objects fell off a table/ledge and the 
greatest rotation would be on the X-Axis with smaller rotations on the 
other two.


> But as a *practical* matter, maybe you're on to something! At least the RH dice
> (die?) does *look* smoother.
> 

600 frames in 10 seconds makes 60 fps which might explain it.

I will try and find the time to create a proper pov file using the 
clock. Unfortunately I have had a series of family medical problems 
ending last month with my wife having vertigo and falling and breaking 
her hip. The hospital will not discharge her until they find out what is 
wrong and it is safe for her to go home. Which makes me loath to start a 
proper project where I have to think. {I have owed jr a couple of beta 
tests of his df3 utilities, for some time. (I have not forgotten.)}
I do find this topic interesting and I did start to use Blender's Bullet 
Physics to create a craps table. And see how it handled the rotations.
Incidentally if anyone wants the Mesh2 model of the dice. Just ask.
As for the gyroscope effect. Boom! there goes my head. ;-)



> My two-cents worth ;-)
> 
> 

My tuppence worth. :)



-- 

Regards
     Stephen


Post a reply to this message

From: Kenneth
Subject: Re: object rotations in 2 axes vs. 3
Date: 4 Oct 2018 19:50:01
Message: <web.5bb6a63b307ceb10a47873e10@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> Ah! you spotted the deliberate mistake. Oops! :-(

Oh, so you're trying to play tricks on the poor gringo, eh? I'm onto ya!  :-P

> Unfortunately I have had a series of family medical problems
> ending last month with my wife having vertigo and falling and breaking
> her hip.

Sorry to hear that; I certainly hope the doctors can repair it (or replace the
worn parts.) I can't even begin to imagine the pain she must have experienced.


Post a reply to this message

From: Stephen
Subject: Re: object rotations in 2 axes vs. 3
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)

From: Stephen
Subject: Re: object rotations in 2 axes vs. 3
Date: 5 Oct 2018 08:00:02
Message: <5bb75242@news.povray.org>
On 05/10/2018 10:59, Stephen wrote:

> 




> 
> 
> 
> ////////////////////////////////////////////////
> 
> 
> 




> 


> 






> 





> 
> 
> rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>
> 
> 


> 






> 





> 
> rotate <Die_X_rot, Die_Y_rot, 0>




Changed the order of rotation to
rotate <0, Die_Y_rot, 0>
rotate <0, 0, Die_Z_rot>
rotate <Die_X_rot, 0, 0>

and reduced the framerate to 30 fps; 300 frames.



-- 

Regards
     Stephen


Post a reply to this message


Attachments:
Download '0001-0299.mp4.mpg' (495 KB)

From: clipka
Subject: Re: object rotations in 2 axes vs. 3
Date: 5 Oct 2018 11:42:43
Message: <5bb78673$1@news.povray.org>
Am 03.10.2018 um 02:34 schrieb Kenneth:
> To take a break from my other POV-ray chores, I made a simple animated demo of
> what an object looks like when it rotates (in POV-ray), as if free-falling under
> gravity-- but discounting wind resistance or any other extra force. Its a
> comparison between applying the rotations in two axes vs. three. I made the
> animation my own purposes (to easily refer to later), but it might be of
> interest to others as well.

If free-fall without air resistance is what you want to model, you
should use a /single/ rotation about an arbitrary axis.

This is because without external forces, angular momentum is conserved,
i.e. the axis of rotation doesn't change.


When you combine it with a second rotation, two things can happen:

(A) If both rotational axes remain stable in space and you apply the
rotations simultaneously, the result is just a single constant rotation
about a different axis.

A real-life equivalent would be a ball set in motion by two rollers
touching it on non-opposing points.

(B) If you apply the second rotation after or before the first, the
result is a precessing motion.

A real-life equivalent would be a rotating object mounted in a gimbal,
which in turn is also rotating.


Thing you get if you specify a two-axis rotation in POV-Ray is (B): The
rotation around the X axis is applied first, then the rotation around y
is applied, effectively changing the axis around which the first
rotation is applied.

This violates conservation of angular momentum, and thus is only
realistic when external forces are present, such as due to air
resistance. In that context, a precessing motion would happen if the
(asymmetric) wind resistance remained constant, which may be close to
realistic for some comparatively symmetric objects.

A rotation about a third axis adds yet another layer of complexity,
turning the precessing motion into a tumbling motion. This should be the
closest to realism at least for highly asymmetric objects.

In either case - precessing or tumbling motion - the motion will only be
a rough approximation of real physical behaviour.


Post a reply to this message

From: clipka
Subject: Re: object rotations in 2 axes vs. 3
Date: 5 Oct 2018 11:49:56
Message: <5bb78824$1@news.povray.org>
Am 03.10.2018 um 11:25 schrieb Kenneth:
> The interesting thing about two-axis rotation is that the object *eventually*
> assumes every possible orientation, at least according to the many visual tests
> I've done (or else I'm much mistaken!)

That certainly depends on the frequencies of the rotations. If they are
in harmony (i.e. their ratio is a rational number), the motion will be
the spherical equivalent of a Lissajous figure. You'd need a
non-rational real number ratio to cover every orientation.


Post a reply to this message

From: Stephen
Subject: Re: object rotations in 2 axes vs. 3 A comparison
Date: 5 Oct 2018 11:50:11
Message: <5bb78833@news.povray.org>
On 05/10/2018 12:59, Stephen wrote:
> Changed the order of rotation to
> rotate <0, Die_Y_rot, 0>
> rotate <0, 0, Die_Z_rot>
> rotate <Die_X_rot, 0, 0>

A comparison of the above Vs rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>

The blue dice uses rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>


-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: object rotations in 2 axes vs. 3 A comparison
Date: 5 Oct 2018 11:51:18
Message: <5bb78876@news.povray.org>
On 05/10/2018 16:50, Stephen wrote:
> On 05/10/2018 12:59, Stephen wrote:
>> Changed the order of rotation to
>> rotate <0, Die_Y_rot, 0>
>> rotate <0, 0, Die_Z_rot>
>> rotate <Die_X_rot, 0, 0>
> 
> A comparison of the above Vs rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>
> 
> The blue dice uses rotate <Die_X_rot, Die_Y_rot, Die_Z_rot>
> 
> 
With animation, now.



-- 

Regards
     Stephen


Post a reply to this message


Attachments:
Download '0001-0599.mp4.mpg' (638 KB)

From: clipka
Subject: Re: object rotations in 2 axes vs. 3
Date: 5 Oct 2018 12:10:02
Message: <5bb78cda$1@news.povray.org>
Am 03.10.2018 um 14:13 schrieb Kenneth:

> Going back to first principles: An object starts out as being static (that is,
> no ROTATIONS at all.) Then a force has to impinge on it to start it rotating-- a
> 'point' force for simplicity's sake. That force has a direction vector, and acts
> on the object in 3 (de-composed) vector directions, toward the center of mass.
> The magnitudes of those three vectors depend on where the force was applied on
> the surface (relative to the object's center of mass) and the angle of contact
> with the surface. If I understand the concept of 'Euler angles' correctly, those
> three force vectors can be 'simplified/combined' into just two resulting
> rotations.

No, the effect of a single force it is just a single rotation, with an
arbitrarily oriented axis.

You may have to snap out of the Euler angles picture for this. Euler
angles are good for describing "rotations" as in "transformations", but
they're of no use for properly describing "rotations" as in "continuous
motion".


To describe a realistic no-force rotation in 3D space, if you have only
Euler angles to work with, you need three angles: A changing one
describing the rotation itself, and two fixed(!) ones describing the
orientation of the rotational axis.

For a precessing motion you'd need six angles: Two fixed ones describing
the axis of precession, one changing one describing the precession
itself, another fixed one describing the tilt of the main axis in
relation to the precession axis, and another changing one describing the
main rotational motion itself. A sixth fixed angle is needed if you care
about the phase relationship between the precession and main rotation.


What you get with two changing Euler angles is a precessing motion with
a 90 degree angle between the axis of precession and the main axis, and
a fixed axis of precession (the y axis if you use `rotate <A,B,0>`).


Post a reply to this message

From: green
Subject: Re: object rotations in 2 axes vs. 3
Date: 5 Oct 2018 19:50:00
Message: <web.5bb7f75f307ceb1088dbe9e30@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 03.10.2018 um 02:34 schrieb Kenneth:
> > To take a break from my other POV-ray chores, I made a simple animated demo of
> > what an object looks like when it rotates (in POV-ray), as if free-falling under
> > gravity-- but discounting wind resistance or any other extra force. Its a
> > comparison between applying the rotations in two axes vs. three. I made the
> > animation my own purposes (to easily refer to later), but it might be of
> > interest to others as well.
>
> If free-fall without air resistance is what you want to model, you
> should use a /single/ rotation about an arbitrary axis.
>
> This is because without external forces, angular momentum is conserved,
> i.e. the axis of rotation doesn't change.
>
>
> When you combine it with a second rotation, two things can happen:
>
> (A) If both rotational axes remain stable in space and you apply the
> rotations simultaneously, the result is just a single constant rotation
> about a different axis.
>
> A real-life equivalent would be a ball set in motion by two rollers
> touching it on non-opposing points.
>
> (B) If you apply the second rotation after or before the first, the
> result is a precessing motion.
>
> A real-life equivalent would be a rotating object mounted in a gimbal,
> which in turn is also rotating.
>
>
> Thing you get if you specify a two-axis rotation in POV-Ray is (B): The
> rotation around the X axis is applied first, then the rotation around y
> is applied, effectively changing the axis around which the first
> rotation is applied.
>
> This violates conservation of angular momentum, and thus is only
> realistic when external forces are present, such as due to air
> resistance. In that context, a precessing motion would happen if the
> (asymmetric) wind resistance remained constant, which may be close to
> realistic for some comparatively symmetric objects.
>
> A rotation about a third axis adds yet another layer of complexity,
> turning the precessing motion into a tumbling motion. This should be the
> closest to realism at least for highly asymmetric objects.
>
> In either case - precessing or tumbling motion - the motion will only be
> a rough approximation of real physical behaviour.

interesting reading on this topic
https://en.wikipedia.org/wiki/Poinsot's_ellipsoid

you can search youtube with that term.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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