shinsuke matsumoto's blog thing.

Expression Experiments - Circular Position
With this expression, you can automate the arranging the object on a circular position by duplicating the layer like the image below.

Circular Position Sample

[Quick Set Up]
Create the center object and position it wherever you want. As a center point, it’s a base of all positions. I recommend a null layer for it. Next step, create the first object. The name of first object needs to include a space and number 1, such as “circle 1”. Then apply the expression below to the position property. There remains only to duplicate it.

[Expression]

center = thisComp.layer("center").transform.position; //center of arrangement
radius = 300;
num = parseInt(name.split(" ")[1]) - 1;
angle = 45; //degree
radian = degreesToRadians(angle * num);
x = Math.sin(radian) * radius;
y = -Math.cos(radian) * radius;
center + [x, y]

 

[Modified Version]
Here’s a sample with a modified version of this expression.
Circular Position Modified Sample
Spiral Motion Sample

After all, a project file is worth a thousand words. So download it from the link below and play around with it!
I would much appreciate it if you could give me a feedback. So please don’t hesitate to get in touch with me if you find some errors or better ways.
I hope you develop the expression and create awesome motion graphics.
 
 

Download the AEP file for free
Download the AEP file (CS6) for free
 
 

Advertisements

5 Responses to “Expression Experiments – Circular Position”

  1. Kevin

    Damn! This is fantastic! I’m working out how to create this in Processing. Thanks mate!

    Reply
    • beatgram

      Thank you for your comment, Kevin.
      For Processing? That’s pretty great! Sometimes I also convert Javascript techniques to AE expressions. Anyway, I’ll share more expressions on here when I have time. So I look forward to your continuous support.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

%d bloggers like this: