POV-Ray : Newsgroups : povray.binaries.animations : object rotations in 2 axes vs. 3 Server Time
11 May 2024 14:24:42 EDT (-0400)
  object rotations in 2 axes vs. 3 (Message 17 to 26 of 46)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: object rotations in 2 axes vs. 3
Date: 3 Oct 2018 15:50:01
Message: <web.5bb51d03307ceb10c437ac910@news.povray.org>
I think that there's a "look_at" type positioning of the object, and a "sky"
type twisting.

With regard to the "look" and "feel" of the motion, I do believe that Stephen
and TdG agree with me that 1 more thing is "too much".

Consider the external ballistics of a projectile.
Usually one imparts spin to stabilize it in flight, and this gives it a
rotational inertia that must be overcome to twist it perpendicular to the axis
of rotation.   The faster it spins, the less it nutates.

So I think that you may have a tumble with a bit of wobble, but adding a 3rd
element of motion just doesn't seem to "fit in" to the scheme of things.

https://www.google.com/search?q=projectile+stabilization+spin

Of tangential, somewhat related interest is how calculators do sin cos, etc,
which IIRC has it's origin in flight computers.

https://www.google.com/search?q=cordic
https://www.qc.cuny.edu/Academics/Degrees/DMNS/Faculty%20Documents/Sultan1.pdf


Post a reply to this message

From: Kenneth
Subject: Re: object rotations in 2 axes vs. 3
Date: 3 Oct 2018 17:10:01
Message: <web.5bb52ffc307ceb10a47873e10@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

>
> Natural moves usually try to conserve energy and have no acceleration.
> In such setting, it is unlikely to see the axis of the last rotation be
> moved by the change in the second angle: the gyroscopic effect (and our
> expectation about it) would oppose to such change.
>
The gyroscopic effect: THAT'S an additional real-world 'force' that didn't occur
to me at all-- kind of like the forth (invisible) man in the room  :-O  And it's
quite fundamental to the discussion, IMO. I assume that even a *slowly* rotating
object would exhibit a gyroscopic effect, to some degree. Simple <x,y,z>
rotations in a computer certainly don't take that into account-- which might
explain the apparent difference between using 3 axes of (computer) rotation, and
what we 'expect' to see based on real-world spinning objects in free fall.

For argument's sake, let's say that real-world free-falling rotation of an
object *is* around all 3 axes. Maybe it is, maybe it isn't--but my mental
concept of the effect of the gyroscopic force is that it may 'smooth out' the
jitter/wobble caused by the 3rd-axis rotation-- leading to the expectation that
a computer simulation of TWO-axis rotation looks more 'natural.' Put another
way: If the effect of gyroscopic spin could be included in POV-ray's rotations,
would the apparently weird result of 3-axis rotation 'smooth out' to look more
like two-axis rotation?


Post a reply to this message

From: Kenneth
Subject: Re: object rotations in 2 axes vs. 3
Date: 4 Oct 2018 12:10:01
Message: <web.5bb63a6f307ceb10a47873e10@news.povray.org>
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.

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

?

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

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

My two-cents worth ;-)


Post a reply to this message

From: Kenneth
Subject: Re: object rotations in 2 axes vs. 3
Date: 4 Oct 2018 12:25:00
Message: <web.5bb63dff307ceb10a47873e10@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> >
> It's not the size which matters, it is how you use it.

LOL!
>
> composing rotations might not be what seems natural, especially when
> they are done along fixed axes. Euler's angles have moving axis: the
> first rotation is from the base(x, on z), but the second is from the
> updated vector (on updated x), and so is the third (on updated z) which
> in part compensate for the first one.

Yes; that seems to be the primary idea and reason for Euler's mathmatical
invention.

>
> To summarize:
> you need 3 angles (in Euler's system) to describes any orientation, but
> natural fall would only change two angles during animation and such
> change would be with a null second derivative for each unless you have
> friction or engine in play.

Yeah! That's what *I* think :-)
(...as I thumb through my calculus books with a quizzical look on my face...)


Post a reply to this message

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

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

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