0

I would like to create an animation to open circumference of a circle as a straight line exactly. I am currently learning After Effects and i have some idea about it but i could not do it.

It is very important to me. Can anyone help me to do it?

  • I'd be interested in knowing this too.. Initially I thought you could turn a circle path into a bezier, but this doesn't work as the bezier is joined up, and also the paths are "stretchy". I'm guessing you need to do it as an expression somehow, maybe with beams? – tomh Feb 21 '19 at 9:16
1

Use masks. Make a mask with 5 points, one in the centre of the circle two on either side in line with the first and two far enough away so that the mask covers half the circle. Then animate the second two points to travel together and meet in the centre.

Actually do the above, but reverse the order.

Here it is with a matte layer to show you the shape of the mask I'm talking about.

enter image description here

and the end result

enter image description here

Remember that the points on animated masks travel in straight lines between keyframes. So the beginning and end positions of the moving points have to be far enough out that they don't go inside the circle.

Edit

Here's an expression to create a circle, and a line and interpolate between the two. The intermediate frames are kinda ugly, I'd probably convert the expression to keyframes and delete all but the first and last frames, then manually animate the in-between.

circle turning into a line

var radius = 100;
var animationDuration = 2;
//You can't draw a perfect circle with Beziers, but this is a good approximation
var handleLength = radius * 4 * (Math.sqrt(2)-1)/3; //Because maths. 
var circlePoints = [];
var outHandles = [];
var inHandles =[];
var Tau = 2* Math.PI;
for (i = 0; i < 5; i++){
    circlePoints[i] = [Math.sin(Tau * i/4) * radius, Math.cos(Tau * i/4) * radius];
    outHandles[i] = [Math.sin(Tau * (i+1)/4) * handleLength, Math.cos(Tau * (i+1)/4) * handleLength];
    inHandles[i] = [0,0] - outHandles[i];
}

var linePoints = [];
var lineInHandles = [];
var lineOutHandles = [];

for (i = 0; i < 5; i++){
    linePoints[i] = [radius * (1 - i / 2), 0];
}
var thePoints = [];
var theinTangents = [];
var theOutTangents =  [];

var t = Math.min(time / animationDuration, 1);
for (i = 0; i < 5; i++){
    thePoints[i] = circlePoints[i] * (1-t) + linePoints[i] * t;
    theinTangents[i] = inHandles[i] * (1-t);
    theOutTangents[i] =  outHandles[i] * (1-t);
}

createPath(points = thePoints, inTangents = theinTangents, outTangents = theOutTangents, isClosed = false);
|improve this answer|||||
  • I think he's asking how to change the circumference of the circle into a straight line - ie unbend the shape of a circle into a line – tomh Aug 22 '19 at 9:38
  • You can freehand draw a circle using the pen tool, then freehand draw a line with four points, set a keyframe for the path of the circle, copy the path attribute from the line and paste it onto the circle path further down the timeline. But the intermediate shape will be messy. Otherwise you can just scale a circle down on the y axis until it's completely flat. Depends what you want the intermeiate shapes to look like. – stib Aug 22 '19 at 10:07
  • Is there a sensible way to do it programmatically? – tomh Aug 22 '19 at 10:47
  • See my edit above – stib Aug 23 '19 at 2:22
  • UV'd (drive-by), great answer. Still don't get the general voting mentality here... – p2or Aug 24 '19 at 15:15
0

See How to transform a Circle into a Straight line?

Here, Rick Gerard gives a few suggestions how you could do it.

I guess the best way would be to make a line and bend it like a circle, zoom really far in and put the end points near each other, but don't connect them.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.