Skip to main content
Participating Frequently
October 17, 2010
Question

How to rotate a point around another one

  • October 17, 2010
  • 2 replies
  • 1867 views

I need to rotate a point reference in a effect

around another point (that is another effect point reference)

keep the second one fixed and make a perfect cicle path.

In other words:

i have an effect applied to a layer

this effect has an reference point

how to rotate around another reference point?

thanks for help

This topic has been closed for replies.

2 replies

Participating Frequently
October 17, 2010

fromComp

thisComp

toComp

Dan Ebberts
Community Expert
Community Expert
October 17, 2010

Say you have two lens flares applied to the same layer. Assuming you want to

control the angle of the second flare relative to the first flare with an

Angle Control, you could use an expression like this for the second flare's

center point:

angle = effect("Angle Control")("Angle");

p1 = toComp(effect("Lens Flare")("Flare Center"));

p2 = toComp(value);

delta = p2 - p1;

radius = length(p2,p1);

a = Math.atan2(delta[1],delta[0]);

newAngle = a + degreesToRadians(angle);

x = radius*Math.cos(newAngle);

y = radius*Math.sin(newAngle);

p1 + fromComp()

Dan

Participating Frequently
October 17, 2010

thank for your time, Dan.

wouldnt it be a way to link each (effect) center point to a dummy

and rotate each dummy around the other anchor point?

Dan Ebberts
Community Expert
Community Expert
October 17, 2010

Sure. In that case you would attach each effect point like this:

fromComp(thisComp.layer("Null 1").toComp([0,0,0]))

Dan