ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Twin pendulum, a table hanging on two ropes

FAQ   •   VIEW ALL Twin pendulum, a table hanging on two ropes on Nov 13, 2019 at 1:05:32 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? Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 7:27:47 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 Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 3:39:28 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  Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 4:02:54 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 Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 6:23:07 pm

it did not work, the board still attached to the left rope but swings, the board doesn't remain horizontal Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 6:24:26 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 Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 6:40:50 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 Re: Twin pendulum, a table hanging on two ropeson Nov 13, 2019 at 10:19:30 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 Re: Twin pendulum, a table hanging on two ropeson Nov 14, 2019 at 4:41:36 am

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

SOLVE IT! Re: Twin pendulum, a table hanging on two ropeson Nov 16, 2019 at 1:35:29 am

Now i have a new chalenge:

How can I do so that only one side of the board falls off but the other side is still stuck to the rope swnging? Re: Twin pendulum, a table hanging on two ropeson Nov 16, 2019 at 7:18:19 am

Something like this maybe:

``` tBreak = 6; if (time < tBreak){ thisComp.layer("left rope").transform.rotation*-1; }else{ freq = 1.5; //oscillations per second amplitude = 90; decay = 1; t = time - tBreak; 90-amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t); } ```

Dan Re: Twin pendulum, a table hanging on two ropeson Nov 18, 2019 at 3:44:02 am