POV-Ray : Newsgroups : povray.animations : Western Wheel calculations Server Time: 16 Dec 2018 21:47:49 GMT
  Western Wheel calculations (Message 1 to 10 of 10)  
From: Bald Eagle
Subject: Western Wheel calculations
Date: 30 Jul 2015 01:40:00
Message: <web.55b9804e97eff9955e7df57c0@news.povray.org>
So, I would normally just puzzle this out myself, but it's 98 degrees here
(Fahrenheit, not rotationally  ;)  ) and my gray matter is cooked.

Anyway, concerning the "Western Wheel" problem:
http://www.f-lohmueller.de/pov_tut/animate/anim13e.htm

I have a gear that turns 7 times in 37 frames.
(it drives a gear that turns once per 7 revolutions, I'm doing a quick "36"
frames, and cyclic animation is on - so it's 37)
It has 5 spokes, and 55 gear teeth.

I'm assuming I take 360 degrees, then divide by 55 teeth, and multiply by 7
revolutions to get the total apparent movement of a tooth.  Then divide by 37
frames to find the "apparent movement" of a tooth between frames in degrees.

The "Western Wheel limit" is half of the span between teeth per frame, so that
would be (360/55)/2.

If the first calculation is correct, then if it's less than the limit, I
shouldn't get the undesired visual effect.  Correct?

Could someone check my logic / math?

Thanks  :)


Post a reply to this message

From: Le Forgeron
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 05:26:05
Message: <55b9b56d$1@news.povray.org>
Le 30/07/2015 03:39, Bald Eagle a écrit :
>
> So, I would normally just puzzle this out myself, but it's 98 degrees here
> (Fahrenheit, not rotationally  ;)  ) and my gray matter is cooked.
>
> Anyway, concerning the "Western Wheel" problem:
> http://www.f-lohmueller.de/pov_tut/animate/anim13e.htm
>
> I have a gear that turns 7 times in 37 frames.
> (it drives a gear that turns once per 7 revolutions, I'm doing a quick "36"
> frames, and cyclic animation is on - so it's 37)
> It has 5 spokes, and 55 gear teeth.
>

37 frames, but 36 movements, before repetition ? or 37 distinct moves 
(between frame n and n+1) and frame 38 is identical to frame 1 ?

I always get confused by that fence problem.

> I'm assuming I take 360 degrees, then divide by 55 teeth, and multiply by 7
> revolutions to get the total apparent movement of a tooth.  Then divide by 37
> frames to find the "apparent movement" of a tooth between frames in degrees.
>
> The "Western Wheel limit" is half of the span between teeth per frame, so that
> would be (360/55)/2.
>
> If the first calculation is correct, then if it's less than the limit, I
> shouldn't get the undesired visual effect.  Correct?


You mean the visual effect of the wheel moving backward when rolling 
forward ?

I'm not sure my eyes wouldn't rather spot the spokes than the teeth.

You can also help my poor brain by having a spottable unique feature on 
wheel (such as a valve or a big mark/hole), easier to track

>
> Could someone check my logic / math?
>
> Thanks  :)
>
>
>
>


Post a reply to this message

From: Bald Eagle
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 11:15:00
Message: <web.55ba06b5231eda285e7df57c0@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:

> 37 frames, but 36 movements, before repetition ? or 37 distinct moves
> (between frame n and n+1) and frame 38 is identical to frame 1 ?

cyclic = on keeps the end frame and the starting frame from being identical and
"jolting when it hits that double-frame in the playback loop


> You mean the visual effect of the wheel moving backward when rolling
> forward ?

Correct.

> I'm not sure my eyes wouldn't rather spot the spokes than the teeth.

It will spot both - especially when the spokes seem to be moving forward and the
gear teeth moving in the opposite direction!

> You can also help my poor brain by having a spottable unique feature on
> wheel (such as a valve or a big mark/hole), easier to track

There an extension on one spoke with a crank handle - can't miss it!  :D
I'll likely also have some type of texturing, such that those small features are
asymmetric, and the eye will follow it all better.

So many other things to do - so little time to POV lately.


Post a reply to this message

From: Stephen
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 12:50:26
Message: <55ba1d92$1@news.povray.org>
On 7/30/2015 2:39 AM, Bald Eagle wrote:
>
> So, I would normally just puzzle this out myself, but it's 98 degrees here
> (Fahrenheit, not rotationally  ;)  ) and my gray matter is cooked.
>
> Anyway, concerning the "Western Wheel" problem:
> http://www.f-lohmueller.de/pov_tut/animate/anim13e.htm
>
> I have a gear that turns 7 times in 37 frames.
> (it drives a gear that turns once per 7 revolutions, I'm doing a quick "36"
> frames, and cyclic animation is on - so it's 37)
> It has 5 spokes, and 55 gear teeth.
>
> I'm assuming I take 360 degrees, then divide by 55 teeth, and multiply by 7
> revolutions to get the total apparent movement of a tooth.  Then divide by 37
> frames to find the "apparent movement" of a tooth between frames in degrees.
>
> The "Western Wheel limit" is half of the span between teeth per frame, so that
> would be (360/55)/2.
>
> If the first calculation is correct, then if it's less than the limit, I
> shouldn't get the undesired visual effect.  Correct?
>
> Could someone check my logic / math?
>
> Thanks  :)
>
>
>
>
Your grey matter is cooked? So is mine and it is cool here.
I will have a look at your calculations a bit later.
I did something similar a few years ago and uploaded it to youtube a 
couple of years ago.
https://www.youtube.com/watch?v=BOjKESXP814
and
https://www.youtube.com/watch?v=XTBurdd1Ad4


I think that I did not want to see the gears going backward so I did not 
do your type of calculations.
What I did do was to split the animation into cyclic parts.
For instance if in your animation the gear turns 5 times in the time 
frame. Then you only need to code a fifth of the revolutions and repeat 
that continuously. That way you can have a faster frame rate. This will 
mean that the angle moved each frame is smaller.
With your figures each frame will rotate the gear 68.108 degrees. I see 
a problem with that. Of course this technique relies on the symmetry of 
the object.

The other thing is, using Pov's cyclic animation. You don't render one 
frame less as PovRay does the donkey work in calculating the clock 
delta. I think that is how it works but it is a long time since I have 
used it.






-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 12:54:33
Message: <55ba1e89$1@news.povray.org>
A longer one

https://www.youtube.com/watch?v=VfVRnAHu4JI


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 14:50:01
Message: <web.55ba38bc231eda285e7df57c0@news.povray.org>
> What I did do was to split the animation into cyclic parts.
> For instance if in your animation the gear turns 5 times in the time
> frame. Then you only need to code a fifth of the revolutions and repeat
> that continuously.

Well, the problem is that it takes 7 revolutions of the drive wheel to make the
slowest gear complete a single revolution - so I think I have to use that gear
as the basis for my animation.

That gear drive a 1:1 gear, which is coupled by a shaft to a 9-tooth gear, which
drives a 45-tooth gear.  So the last gear travels 1/7 the number of revolutions
(9/45).

That way you can have a faster frame rate. This will
> mean that the angle moved each frame is smaller.
> With your figures each frame will rotate the gear 68.108 degrees. I see
> a problem with that.

I haven't gotten that far along to the finished arrangement yet - I wanted to
zip out a quick sparse-framed animation to take a gander at how it's coming
along before I started coding a lot of things that might need to be changed.

> The other thing is, using Pov's cyclic animation. You don't render one
> frame less as PovRay does the donkey work in calculating the clock
> delta. I think that is how it works but it is a long time since I have
> used it.

I didn't think about it too much.  I plugged in 36 for number of frames and set
cyclic animation to on.   POV-Ray spits out 37 frames.  So be it. I could do 35
or 34.... I think it's irrelevant - though for smoothness I'll probably render
180-360 frames, depending on how it looks.

Thanks!  :)


Post a reply to this message

From: Stephen
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 16:16:09
Message: <55ba4dc9$1@news.povray.org>
On 7/30/2015 3:46 PM, Bald Eagle wrote:
>
>> What I did do was to split the animation into cyclic parts.
>> For instance if in your animation the gear turns 5 times in the time
>> frame. Then you only need to code a fifth of the revolutions and repeat
>> that continuously.
>
> Well, the problem is that it takes 7 revolutions of the drive wheel to make the
> slowest gear complete a single revolution - so I think I have to use that gear
> as the basis for my animation.
>

I would think so too.

> That gear drive a 1:1 gear, which is coupled by a shaft to a 9-tooth gear, which
> drives a 45-tooth gear.  So the last gear travels 1/7 the number of revolutions
> (9/45).
>

Oh! Joy. Odd numbers and primes. :-) Maybe there are no shortcuts.

> That way you can have a faster frame rate. This will
>> mean that the angle moved each frame is smaller.
>> With your figures each frame will rotate the gear 68.108 degrees. I see
>> a problem with that.
>
> I haven't gotten that far along to the finished arrangement yet - I wanted to
> zip out a quick sparse-framed animation to take a gander at how it's coming
> along before I started coding a lot of things that might need to be changed.
>

Of course.

>> The other thing is, using Pov's cyclic animation. You don't render one
>> frame less as PovRay does the donkey work in calculating the clock
>> delta. I think that is how it works but it is a long time since I have
>> used it.
>
> I didn't think about it too much.  I plugged in 36 for number of frames and set
> cyclic animation to on.   POV-Ray spits out 37 frames.  So be it. I could do 35
> or 34.... I think it's irrelevant - though for smoothness I'll probably render
> 180-360 frames, depending on how it looks.
>

Does it? I never noticed it spiting out n+1 frames but it has been a 
long time since I used it.

> Thanks!  :)
>

It's my pleasure. :)
Don't forget to post your results. I for one am interested.

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 18:10:01
Message: <web.55ba67dd231eda285e7df57c0@news.povray.org>
OK, so the problem and its solution is clearer in my heat-addled brain.

I figured at some point I had to take into account the movement of an element
(spoke or tooth) by a multiple of the distance between adjacent elements.
So I used mod() to give me the remainder, and compared this number of degrees to
half the distance between adjacent elements.

I send that all out to a debug stream and get the data below - but it's wrong.
I get the Western Wheel effect with the gear teeth even though my calcs and the
"1/2 distance" theory agree.

Also, is "clock_delta" busticated in 3.7?  It never registers any value other
than zero over all 37 frames.

:(

I use:
#declare Degrees = clock * 360;
and
// ROTATION FOR ANIMATION
// Clockwise = Negative
 rotate <0, 0, -(Degrees*7)>

==============================================
Animation Information:
Number of frames: 37.0
Clock  Delta: 0.0

Wheel2652: 55.0
Degrees between teeth: 6.55
Gear tooth movement between frames: 68.1 degrees
Multiple: 10.405
Western Wheel limit between frames: 3.27 degrees
0.405 x 6.55 = 2.65
 10 x 6.545 = 65.455 + Remainder: (2.65) = 68.1 degrees
2.65 is less than 3.27
OK - Normal Movement

Wheel2652A: 5.0 (spokes)
Degrees between teeth: 72.00
Gear tooth movement between frames: 68.1 degrees
Multiple: 0.946
Western Wheel limit between frames: 36.00 degrees
0.946 x 72.00 = 68.11
  0 x 72.000 = 0.000 + Remainder: (68.11) = 68.1 degrees
greater than 36.00
*** Western Wheel problem ***


Post a reply to this message

From: Stephen
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 19:37:24
Message: <55ba7cf4$1@news.povray.org>
On 7/30/2015 7:07 PM, Bald Eagle wrote:
> OK, so the problem and its solution is clearer in my heat-addled brain.
>

Lucky you :)
Mine is addled by medications :(

> I figured at some point I had to take into account the movement of an element
> (spoke or tooth) by a multiple of the distance between adjacent elements.

Distance not angle, or is that a figure of speech?
Oh national bird of America. ;)
Do you realise that this is taking me back 50 years to high school?

> So I used mod() to give me the remainder, and compared this number of degrees to
> half the distance between adjacent elements.
>

Are you trying to eliminate the effect or show it?

Also what frame rate are you encoding the animation? I think you have to 
take that into account too (also).

Have you tried a test with a single wheel?


> I send that all out to a debug stream and get the data below - but it's wrong.
> I get the Western Wheel effect with the gear teeth even though my calcs and the
> "1/2 distance" theory agree.
>
> Also, is "clock_delta" busticated in 3.7?  It never registers any value other
> than zero over all 37 frames.
>

I've never had the need to use clock_delta so I can't help there.

> :(
>
> I use:
> #declare Degrees = clock * 360;

Hmm! I use frame_number and keep the clock range between 0 & 1. I find 
that it is easier to modify things that way. When I want something to 
happen at a particular time. Although it probably doesn't mater here.

> and
> // ROTATION FOR ANIMATION
> // Clockwise = Negative

Widdershins! Dangerous!  ;)

I had a quick look at Friedrich's site (not the code) and I think that 
you might be trying to correct two illusions at the same time. I would 
either just concentrate on the spokes and let the gears look after 
themselves or greatly increase your frame rate. So that both the gear 
teeth and spokes only incrementally move between frames. Not more than a 
sixth of a revolution as the spokes do.
Notice Friedrich used a solid gear so did not have your problem. Also 
Friedrich did not use a cotter pin, or similar on the axle. That way he 
did not have to run the animation for a full revolution of the large gear.

>   rotate <0, 0, -(Degrees*7)>
>
> ==============================================
> Animation Information:
> Number of frames: 37.0
> Clock  Delta: 0.0
>
> Wheel2652: 55.0
> Degrees between teeth: 6.55
> Gear tooth movement between frames: 68.1 degrees
> Multiple: 10.405
> Western Wheel limit between frames: 3.27 degrees
> 0.405 x 6.55 = 2.65
>   10 x 6.545 = 65.455 + Remainder: (2.65) = 68.1 degrees
> 2.65 is less than 3.27
> OK - Normal Movement
>
> Wheel2652A: 5.0 (spokes)
> Degrees between teeth: 72.00
> Gear tooth movement between frames: 68.1 degrees
> Multiple: 0.946
> Western Wheel limit between frames: 36.00 degrees
> 0.946 x 72.00 = 68.11
>    0 x 72.000 = 0.000 + Remainder: (68.11) = 68.1 degrees
> greater than 36.00
> *** Western Wheel problem ***
>
>


-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: Western Wheel calculations
Date: 30 Jul 2015 23:15:01
Message: <web.55baaf37231eda285e7df57c0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> Lucky you :)
> Mine is addled by medications :(

In some instances, you could be the luck one :D

> > I figured at some point I had to take into account the movement of an element
> > (spoke or tooth) by a multiple of the distance between adjacent elements.
>
> Distance not angle, or is that a figure of speech?
I suppose it's a figure of speech or just lazy language - since arcs of the
circumference are subtended by angles.

> Oh national bird of America. ;)
It's a sort of many-layered inside joke.
Our National Bird will likely soon be the turkey, or the vulture, or the dodo.

> Do you realise that this is taking me back 50 years to high school?
Right, where we should have paid better attention.  ;)




> Are you trying to eliminate the effect or show it?
Eliminate it on all moving parts.
I figured if I could pre-calculate / predict the appearance of the effect, I
could just vary the number of frames rendered between clock 0 ---> 1 and get
something that would mesh well (ha!) with all the gear sizes.

> Also what frame rate are you encoding the animation? I think you have to
> take that into account too (also).
It's in there, since that's how I calculate the degree of rotation between
frames.

> Have you tried a test with a single wheel?
No - it doesn't take that much time to render the whole scene, so I just let 'er
rip.


> > I use:
> > #declare Degrees = clock * 360;
>
> Hmm! I use frame_number and keep the clock range between 0 & 1. I find
> that it is easier to modify things that way. When I want something to
> happen at a particular time. Although it probably doesn't mater here.

It's easier to keep track of things that rotate by assigning a full 360-degree
rotation to a full clock cycle.

> > and
> > // ROTATION FOR ANIMATION
> > // Clockwise = Negative
>
> Widdershins! Dangerous!  ;)

I know, right?   I'm not the one who chose a Left-Handed coordinate system for
POV-Ray  :O

> I had a quick look at Friedrich's site (not the code) and I think that
> you might be trying to correct two illusions at the same time.
I suppose I'm trying to correct 5 illusions at the same time, since I have 5
different size gears (assuming the spokes and teeth of the drive gear are
visually separate)

>I would
> either just concentrate on the spokes and let the gears look after
> themselves or greatly increase your frame rate.

I don't think letting the teeth look after themselves fixes the problem - I have
a narrow window to sync the rotation with the proper positioning.

> So that both the gear
> teeth and spokes only incrementally move between frames. Not more than a
> sixth of a revolution as the spokes do.
A fifth of a revolution would give me a full overlap of symmetry - it would look
like only the handle was moving.  I'd have to stick with a tenth of a revolution
or below to comply with the "1/2 distance" theory.

> Notice Friedrich used a solid gear so did not have your problem. Also
> Friedrich did not use a cotter pin, or similar on the axle. That way he
> did not have to run the animation for a full revolution of the large gear.

Right, but that's a simple demo - the drive gear has to revolve 5 times (not 7
SMH) for the slowest gear to make one full revolution - no way around that.

I jacked the frames up 90, and most of it looks good except for the 3 15-tooth
gears.  I will keep at it.


Post a reply to this message

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