Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Concentric circles and tangential still frames — how do I do this?

  • Concentric circles and tangential still frames — how do I do this?

    Posted by Shaun Kurian on December 14, 2006 at 12:24 pm

    I have 10 concentric circles. I need to arrange still frames tangentially around each circle. Each circle has still frames that are multiples of 24. In other words, the smallest circle in the center will have 24 frames, the next will have 48, the next will have 72, and so on until it reaches the largest circle which will have 24 times 10 = 240 frames around it. Rather than manually placing these frames one by one, is there an expression I can use to make this happen?

    Mylenium replied 19 years, 8 months ago 2 Members · 4 Replies
  • 4 Replies
  • Mylenium

    December 14, 2006 at 12:44 pm

    Sure, some simple trig will do:


    num_items=24; //number of images
    angle=degreesToRadians(360/num_items); //per-item angle
    radius=250; //radius of the circle

    X=thisComp.width*0.5+Math.sin(angle*index)*radius;
    Y=thisComp.height*0.5+Math.cos(angle*index)*radius;

    [X,Y]

    This will create a perfect circle. Ideally you should have each circle in a separate comp. If that’s not possible, make sure to add the offsetts from the other circles to the index value. For the rotation simply add or subtract the segment angle multiplied with the index.


    num_items=24; //number of images
    angle=360/num_items; //per-item angle

    [angle*index]

    Mylenium

    [Pour Myl

  • Shaun Kurian

    December 14, 2006 at 5:23 pm

    Thanks Mylenium you definitely make it sound very easy. I’m not sure about…
    How do I implement these equations?

  • Shaun Kurian

    December 14, 2006 at 9:15 pm

    Yes I did figure out how to implement but I have run into another issue.

    After I assign all of my frames to be 3d and I try to use the camera to go around and through the frames,
    the entire “circle” of frames distorts to accomodate the movement.

    I was hoping that the expression could render all the frames upright around the circle and allow fluid camera movement around the frames.

    Is it possible to make the frames such that they are upright and they go around the circle but they have some space between any two frames on the circle?

  • Mylenium

    December 14, 2006 at 10:04 pm

    I have no idea what you mean by “distorting”. There wil lalways be some perspective skewing wit ha camera in your scene, you can’t defeat the physics/ math. To have space inbetween, simply increase the radius. When you are working in 3D, simply change the expression from 2D to 3D.

    num_items=24; //number of images
    angle=degreesToRadians(360/num_items); //per-item angle
    radius=250; //radius of the circle

    X=thisComp.width*0.5+Math.sin(angle*index)*radius;
    Y=thisComp.height*0.5;
    Y=Math.cos(angle*index)*radius;

    [X,Y,Z]

    For the rotation just use the existing expression on the Y rotation property and leave the others at zero.

    Mylenium

    [Pour Myl

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy