Created
July 2, 2020 12:57
-
-
Save AEnMe/e8b8b46522c703c85d54260e9f27a9ba to your computer and use it in GitHub Desktop.
Create a circle with expression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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