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

How to rotate a point around another one

New Here ,
Oct 16, 2010 Oct 16, 2010

Copy link to clipboard

Copied

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

Views

1.7K

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

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

Dan

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

fromComp

thisComp

toComp

Votes

Translate

Translate

Report

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