# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Twin pendulum, a table hanging on two ropes

• # Twin pendulum, a table hanging on two ropes

2 Members · 17 Posts
• ### Jimmy Lenz

November 13, 2019 at 1:05 am

How can I animate a pendulum in the form of a table hanging on two ropes and that does not rotate to remain horizontal?
I am using this expression to animate the ropes:

freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.3;

amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time)

But when I apply it to the board, it spins and no longer looks like hunging on the ropes

How can I change the expression?

• ### Dan Ebberts

November 13, 2019 at 7:27 am

It’s hard to picture how you have things set up, but if the table doesn’t need to remain horizontal, it seems you could just parent it to one of the ropes and it wouldn’t need a rotation expression.

Dan

• ### Jimmy Lenz

November 13, 2019 at 3:39 pm

Thanks Dan for answering, mi english in not very tecnical,

i meant i want the board remains horizontal when it is swinging because it’s hanging of both ropes

• ### Dan Ebberts

November 13, 2019 at 4:02 pm

Ah, OK. What I would do is move the board’s anchor point to where it attaches to the left rope, parent it to that rope, and add this expression to its rotation:

-parent*rotation

Dan

• ### Jimmy Lenz

November 13, 2019 at 6:23 pm

it did not work, the board still attached to the left rope but swings, the board doesn’t remain horizontal

• ### Jimmy Lenz

November 13, 2019 at 6:24 pm

it did not work, the board still attached to the left rope but swings, the board doesn’t remain horizontal

13886_proyectosinttulo.aep.zip

• ### Dan Ebberts

November 13, 2019 at 6:40 pm

It’s hard to tell what’s going on in your project without the graphics, but it doesn’t appear that the table has been parented to the rope or has the -parent*rotation expression applied to its rotation property.

Dan

• ### Jimmy Lenz

November 13, 2019 at 9:59 pm

something i’m doing wrong,

• ### Dan Ebberts

November 13, 2019 at 10:19 pm

Ah, I guess it’s a language thing. Try pickwhipping from the table’s rotation expression to the parent’s rotation property and then add *-1 to the end. In my project, it looks like this:

thisComp.layer(“left rope”).transform.rotation*-1

Dan

• ### Jimmy Lenz

November 14, 2019 at 4:41 am

Dan you are very patient person, i really appreciate your help and your spirit of service, tank you very much…

SOLVE IT!

Viewing 1 - 10 of 17 posts