POV-Ray : Newsgroups : povray.animations : Trig for Lohmueller chain animation Server Time20 Jun 2024 22:33:22 EDT (-0400)
 Trig for Lohmueller chain animation (Message 1 to 10 of 12)
 From: Bald Eagle Subject: Trig for Lohmueller chain animation Date: 16 Jul 2014 12:00:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.53c6a119e73deed5e7df57c0%40news.povray.org",
"headline": "Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T16:00:01+00:00",
"datePublished": "2014-07-16T16:00:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
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.

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

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?

```
 From: Bald Eagle Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 12:05:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.53c6a29a83f3fc9c5e7df57c0%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T16:05:00+00:00",
"datePublished": "2014-07-16T16:05:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
http://www.f-lohmueller.de/pov_tut/animate/anim141e.htm

#local R1 = 0.15;      // Radius of Large Pulley
#local R2 = 0.075;     // Radius of Small Pulley
#local Dist = 0.30;    // Distance between pulleys
// -------------- calculations ---------
#local Ri = R1-R2;    // Difference in pulley radii
#local C_Angle = degrees(asin(Ri/Dist)); // [Dist is a hypotenuse - should be
cos?!]
// chain length linear
#local LLen=sqrt(pow(Dist,2)-pow(Ri,2)); // [can't use a _hypotenuse_ as a
_side_?!]
```
 From: Le Forgeron Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 12:30:31 Message: <53c6a8a7\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#53c6a8a7%241%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T16:30:31+00:00",
"datePublished": "2014-07-16T16:30:31+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
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?
>
>
>
>

--
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))
```
 From: Bald Eagle Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 12:55:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T16:55:01+00:00",
"datePublished": "2014-07-16T16:55:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
> 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!
```
 From: Bald Eagle Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 13:45:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.53c6ba0283f3fc9c5e7df57c0%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T17:45:01+00:00",
"datePublished": "2014-07-16T17:45:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
New graphic posted in povray.binaries.misc to show solution using alpha and PT.
```
 From: Le Forgeron Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 14:12:13 Message: <53c6c07d@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#53c6c07d%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T18:12:13+00:00",
"datePublished": "2014-07-16T18:12:13+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
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

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))
```
 From: Bald Eagle Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 16:15:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.53c6dc2183f3fc9c5e7df57c0%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T20:15:01+00:00",
"datePublished": "2014-07-16T20:15:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
> 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?
```
 From: Le Forgeron Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 16:24:27 Message: <53c6df7b\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#53c6df7b%241%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T20:24:27+00:00",
"datePublished": "2014-07-16T20:24:27+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
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))
```
 From: Le Forgeron Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 16:26:08 Message: <53c6dfe0@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#53c6dfe0%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T20:26:08+00:00",
"datePublished": "2014-07-16T20:26:08+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
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))
```
 From: Le Forgeron Subject: Re: Trig for Lohmueller chain animation Date: 16 Jul 2014 16:29:19 Message: <53c6e09f\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#53c6e09f%241%40news.povray.org",
"headline": "Re: Trig for Lohmueller chain animation",
"dateCreated": "2014-07-16T20:29:19+00:00",
"datePublished": "2014-07-16T20:29:19+00:00",
"author": {
"@type": "Person",
"name": "Le Forgeron"
}
}
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))
```