Skip to content

Instantly share code, notes, and snippets.

@AEnMe
Created July 2, 2020 12:57
Show Gist options
  • Save AEnMe/e8b8b46522c703c85d54260e9f27a9ba to your computer and use it in GitHub Desktop.
Save AEnMe/e8b8b46522c703c85d54260e9f27a9ba to your computer and use it in GitHub Desktop.
Create a circle with expression
r = effect("radius")(1);
vertex=[];
iTang=[];
oTang=[];
for(i=0;i<4;i++){
j= i+2;
vertex[i]= [ Math.cos(Math.PI/2 * (j+1) ) , Math.cos(Math.PI/2 * j ) ] * r;
iTang[i]=[ Math.cos(Math.PI/2 * j ) , Math.cos(Math.PI/2 * (j-1) ) ] * r * .5523 ;
oTang[i]= -iTang[i];
}
createPath(vertex,iTang,oTang,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment