Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Superellipse/Processing/superellipse.processing
Normal file
22
Task/Superellipse/Processing/superellipse.processing
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
//Aamrun, 29th June 2022
|
||||
|
||||
float a = 200, b = 200, n = 2.5;
|
||||
float i, incr = 0.001;
|
||||
int xMul,yMul;
|
||||
|
||||
size(500,500);
|
||||
|
||||
stroke(#ff0000);
|
||||
|
||||
for(i=0;i<2*PI;i+=incr){
|
||||
if(PI/2<i && i<3*PI/2)
|
||||
xMul = -1;
|
||||
else
|
||||
xMul = 1;
|
||||
if(PI<i && i<2*PI)
|
||||
yMul = -1;
|
||||
else
|
||||
yMul = 1;
|
||||
|
||||
ellipse(width/2 + xMul * a*pow(abs(cos(i)),2/n),height/2 + yMul * b*pow(abs(sin(i)),2/n),1,1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue