Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
36
Task/Polyspiral/Processing/polyspiral.processing
Normal file
36
Task/Polyspiral/Processing/polyspiral.processing
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
//Aamrun, 2nd July 2022
|
||||
|
||||
int incr = 0, angle, i, length;
|
||||
float x,y,x1,y1;
|
||||
double factor = PI/180;
|
||||
|
||||
|
||||
void setup() {
|
||||
size(1000, 1000);
|
||||
stroke(255);
|
||||
|
||||
}
|
||||
|
||||
void draw() {
|
||||
background(51);
|
||||
incr = (incr + 5)%360;
|
||||
|
||||
x = width/2;
|
||||
y = height/2;
|
||||
|
||||
length = 5;
|
||||
angle = incr;
|
||||
|
||||
for(i=1;i<=150;i++){
|
||||
x1 = x + (float)(length*Math.cos(factor*angle));
|
||||
y1 = y + (float)(length*Math.sin(factor*angle));
|
||||
line(x,y,x1,y1);
|
||||
|
||||
length += 3;
|
||||
|
||||
angle = (angle + incr)%360;
|
||||
|
||||
x = x1;
|
||||
y = y1;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue