Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to rotate a point around another one

New Here ,
Oct 16, 2010 Oct 16, 2010

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

TOPICS
Expressions
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2010 Oct 16, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2010 Oct 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2010 Oct 17, 2010

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

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

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2010 Oct 17, 2010

To a expressions novice like me,

your first expression was certainly a stuff to keep and study to learn.

But i have to thank you for the second tip: very precious to me - be sure - and useful for many things here.

I think i cant live no more without fromComp.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2010 Oct 17, 2010
LATEST

fromComp

thisComp

toComp

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines