1
Can you create circle with CreatePath expression?
Engaged
,
/t5/after-effects-discussions/can-you-create-circle-with-createpath-expression/td-p/13915663
Jul 05, 2023
Jul 05, 2023
Copy link to clipboard
Copied
Can you create a circle with CreatePath()?
If not, is there another way to create a circle using expression?
TOPICS
Expressions
,
How to
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/can-you-create-circle-with-createpath-expression/m-p/13915879#M232309
Jul 05, 2023
Jul 05, 2023
Copy link to clipboard
Copied
Something like this should work:
r = 100; // radius
ratio = .5523;
t = r*ratio;
vertices = [[r,0],[0,r],[r,2*r],[2*r,r]];
inTangents = [[t,0],[0,-t],[-t,0],[0,t]];
outTangents = [[-t,0],[0,t],[t,0],[0,-t]];
closed = true;
createPath(vertices,inTangents,outTangents,closed);
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/after-effects-discussions/can-you-create-circle-with-createpath-expression/m-p/13916042#M232311
Jul 05, 2023
Jul 05, 2023
Copy link to clipboard
Copied
This version might be better--it's centered at the anchor point:
r = 100; // radius
ratio = .5523;
t = r*ratio;
vertices = [[0,-r],[r,0],[0,r],[-r,0]];
inTangents = [[-t,0],[0,-t],[t,0],[0,t]];
outTangents = [[t,0],[0,t],[-t,0],[0,-t]];
closed = true;
createPath(vertices,inTangents,outTangents,closed);
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
/t5/after-effects-discussions/can-you-create-circle-with-createpath-expression/m-p/13993227#M234217
Aug 08, 2023
Aug 08, 2023
Copy link to clipboard
Copied
This is great. I clearly didn't pay close attention in my maths classes. But why is the ratio .5523?
Plus it's super fun to link both radius and ratio to sliders and play around with them.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/after-effects-discussions/can-you-create-circle-with-createpath-expression/m-p/13993739#M234224
Aug 08, 2023
Aug 08, 2023
Copy link to clipboard
Copied
I think the actual formula is:
ratio = (Math.SQRT2 - 1)*(4/3);
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

