POV-Ray : Newsgroups : povray.animations : Trig for Lohmueller chain animation Server Time
28 Mar 2024 19:06:03 EDT (-0400)
  Trig for Lohmueller chain animation (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 12:30:31
Message: <53c6a8a7$1@news.povray.org>
Le 16/07/2014 17:58, Bald Eagle nous fit lire :
> I'm just going over the details of animating a chain or belt wrapped around 2
> pulleys.  I understand MY math, and the math posted on Wikipedia.
> 
> http://en.wikipedia.org/wiki/Belt_problem
> (Scroll down to the second, related "Pulley Problem"
> 
> The first step to solving the linear length of belt or chain seems to be to
> establish the angle at which the belt is tangent to the pulley, and then from
> that, the linear length can be calculated.
> 
> What is driving me absolutely crazy, is that I'm actually USING FM's code for
> animating a belt, and IT WORKS.  But I look at the known parameters (distance
> between pulleys and difference of the radii) and consistent with the Wikipedia
> math, I use (ARC)COSINE to solve for the angle.  FM uses the SINE.  This doesn't
> seems possible.

You are not measuring the same angle.
Wikipedia computes the covering angle theta on smallest wheel.
FM computes the angle of the belt with the axis of the wheels. (alpha).

The relation is theta = pi - 2 alpha. (or alpha = (pi-theta)/2 ).

When remplacing cos( angle) with an angle2 = pi/2 - angle, cosine become
a sine, and vice-versa.


> 
> Then, when I solve for the linear length, I use the trigonometric relationship
> to derive the length of the remaining side, but FM employs the Pythagorean
> Theorem.  How is this possible when P, the distance between the two pulleys is
> the HYPOTENUSE?!

You have the length hypothenuse, you have the length of the small side,
it is obvious to compute the length of the third side with Pythagore.

( H^2 = S^2 + L^2, hence L = sqrt( H^2 - S^2 ), no problem)

You noticed the subtraction, right ?

> 
> It seems like it ought to turn out oh-so-woefully wrong, but the render and
> animation give one of FM's flawlessly beautiful creations.
> 
> Can someone look at this and explain what Dark Magic is at work here?
>
http://news.povray.org/povray.binaries.misc/thread/<web.53c69f83e73deed5e7df57c0%40news.povray.org>/
> 
> [If posting graphics attachments in another thread, please provide a link in
> this thread]
> 
> 


-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Bald Eagle
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 12:55:01
Message: <web.53c6ad9883f3fc9c5e7df57c0@news.povray.org>
> You are not measuring the same angle.

Grrr.  I suspected something like this, but for some reason I just couldn't
"see" it.   Thanks for that - I really needed a fresh set of eyes connected to a
sharp mind to point me in the right direction.

> You have the length hypothenuse, you have the length of the small side,
> it is obvious to compute the length of the third side with Pythagore.
>
> ( H^2 = S^2 + L^2, hence L = sqrt( H^2 - S^2 ), no problem)
>
> You noticed the subtraction, right ?

No, no I didn't.  Between all the different software packages and languages and
coordinate systems I use, it's wonder sometimes I can walk in a straight line to
the coffee pot when I get out of my chair.

Thanks again, friend!


Post a reply to this message

From: Bald Eagle
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 13:45:01
Message: <web.53c6ba0283f3fc9c5e7df57c0@news.povray.org>
New graphic posted in povray.binaries.misc to show solution using alpha and PT.


Post a reply to this message

From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 14:12:13
Message: <53c6c07d@news.povray.org>
Le 16/07/2014 19:44, Bald Eagle nous fit lire :
> New graphic posted in povray.binaries.misc to show solution using alpha and PT.
> 
> 
Just a small point or two: sinus is opposite/hypothenuse... tangente is
opposite/adjacent.

sin(alpha) = (r1-r2)/P

90 deg is pi/2, not 2 pi.

The expression of total length based on alpha is missing.
It should be
2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin((r1-r2)/P))*(r1-r2)

The interesting point of that formula is that it is invariant about the
value of r1 & r2. Whereas the Wiki formula has to have r1 > r2 or it fails.

(I might be wrong about the formula, but the invariant is there).

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Bald Eagle
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 16:15:01
Message: <web.53c6dc2183f3fc9c5e7df57c0@news.povray.org>
> Just a small point or two:

Yeah, I think Error Checking got toggled to OFF today.
Maybe it's the heat.  Or intellectual sloth.   :O

> The expression of total length based on alpha is missing.
> It should be

2*sqrt[P^2 - (r1-r2)^2)]      // Twice the linear length
+
2*pi*r2                       // that gives the whole circumference of circle 2
     Should it be r2 x [(pi/2) - (2 x alpha)] ?
+
(pi+2*asin((r1-r2)/P))*(r1-r2)
         =alpha * difference

------------------------------
I worked out what you did there.
You have a very different way of thinking than I do.

I got:
Twice the linear length  +   Sector length of Large Pulley    +   Sector length
of Small Pulley

2*sqrt[P^2 - (r1-r2)^2)] + [r1 x (pi/2)] + [r1 x (2 x alpha)] + [r2 x (pi/2)] -
[r2 x (2 x alpha)]

which if rewritten to use (r1-r2) would give (r1 - r2) x [(pi/2) + (2 x alpha)],
which is then subtracting [r2 x (pi/2)], so then you have to add back in twice
that, 2 x [r2 x (pi/2)], which gives your 2 x pi x r2 term.

Included in Rev 3.0   :)

> The interesting point of that formula is that it is invariant about the
> value of r1 & r2. Whereas the Wiki formula has to have r1 > r2 or it fails.

If I'm understanding you, that's because it gives a negative value for the
dimension of that side of the right triangle.  Taking the absolute value of the
difference ought to rectify that, correct?


Post a reply to this message

From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 16:24:27
Message: <53c6df7b$1@news.povray.org>
Le 16/07/2014 22:10, Bald Eagle nous fit lire :
> 
>> Just a small point or two:
> 
> Yeah, I think Error Checking got toggled to OFF today.
> Maybe it's the heat.  Or intellectual sloth.   :O
> 
>> The expression of total length based on alpha is missing.
>> It should be
> 
> 2*sqrt[P^2 - (r1-r2)^2)]      // Twice the linear length
> +
> 2*pi*r2                       // that gives the whole circumference of circle 2
>      Should it be r2 x [(pi/2) - (2 x alpha)] ?

No, the full circumference is intended.
> +
> (pi+2*asin((r1-r2)/P))*(r1-r2)
>          =alpha * difference

I made a sign error when r1<r2, see below.
But yes, it's the difference*(half-circumference + twice adjustment of
alpha)

> 
> ------------------------------
> I worked out what you did there.
> You have a very different way of thinking than I do.
> 
> I got:
> Twice the linear length  +   Sector length of Large Pulley    +   Sector length
> of Small Pulley
> 
> 2*sqrt[P^2 - (r1-r2)^2)] + [r1 x (pi/2)] + [r1 x (2 x alpha)] + [r2 x (pi/2)] -
> [r2 x (2 x alpha)]

you have an issue with pi/2 (you were to write pi), otherwise it's ok.

> 
> which if rewritten to use (r1-r2) would give (r1 - r2) x [(pi/2) + (2 x alpha)],
> which is then subtracting [r2 x (pi/2)], so then you have to add back in twice
> that, 2 x [r2 x (pi/2)], which gives your 2 x pi x r2 term.
> 
> Included in Rev 3.0   :)
> 
>> The interesting point of that formula is that it is invariant about the
>> value of r1 & r2. Whereas the Wiki formula has to have r1 > r2 or it fails.
> 
> If I'm understanding you, that's because it gives a negative value for the
> dimension of that side of the right triangle.  Taking the absolute value of the
> difference ought to rectify that, correct?
> 
> 
> 
> 
Yes.

My bad, it should have been :

2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin((r1-r2)/P))*(abs(r1-r2))

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 16:26:08
Message: <53c6dfe0@news.povray.org>
Le 16/07/2014 22:24, Le_Forgeron nous fit lire :
> My bad, it should have been :
> 
> 2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin((r1-r2)/P))*(abs(r1-r2))

Once more... the absolute value was misplaced.

2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin(abs(r1-r2)/P))*(r1-r2)

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 16:29:19
Message: <53c6e09f$1@news.povray.org>
Le 16/07/2014 22:24, Le_Forgeron nous fit lire :
> My bad, it should have been :
> 
> 2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin((r1-r2)/P))*(abs(r1-r2))

Bugged again... and the interest of asin get lower.

2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin(abs(r1-r2)/P))*((r1-r2))


-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Le Forgeron
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 16:32:01
Message: <53c6e141$1@news.povray.org>
Le 16/07/2014 22:24, Le_Forgeron nous fit lire :

> My bad, it should have been :
> 
> 2*sqrt(P^2 - (r1-r2)^2)) +2*pi*r2 + (pi+2*asin((r1-r2)/P))*(abs(r1-r2))
> 

Bugged again.
It's simpler and better :

2*sqrt(P^2 - (r1-r2)^2)) +pi*r2 + pi*r1 +2*asin((r1-r2)/P)*(r1-r2)

no need for abs(), as the last product will always be positive.

-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

From: Bald Eagle
Subject: Re: Trig for Lohmueller chain animation
Date: 16 Jul 2014 18:10:00
Message: <web.53c6f75d83f3fc9c5e7df57c0@news.povray.org>
OK, I'm pretty sure that at long last I fixed it and clarified the diagrams and
equations.  Thanks again for all of your help, This is all a LOT clearer now.

Maybe I'll rewrite the SDL code to reflect how this all works and make it a bit
clearer.  I know that I've already got some modifications I added last year, and
now I'll just take a whack at the rest of it.


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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