37 lines
535 B
Plaintext
37 lines
535 B
Plaintext
//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;
|
|
}
|
|
}
|