Skip to content

Instantly share code, notes, and snippets.

@wonderburg7
Created March 14, 2019 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wonderburg7/63c9580085fc1f3e9a95af34924dc7a5 to your computer and use it in GitHub Desktop.
Save wonderburg7/63c9580085fc1f3e9a95af34924dc7a5 to your computer and use it in GitHub Desktop.
int i = 0, j =0, k =0, y=0, r, degreepoint = 0, d1, d2;
int angle1, angle2, point;
int radius1, radius2;
int diffValue;
void setup()
{
size(4000, 4000);
background(47, 62, 70);
noLoop();
}
void draw() {
strokeWeight(8);
stroke(202, 210, 197);
//translate(width*0.25, height*0.25);
pushMatrix();
translate(width*.5, width*.5);
for (k = 0; k < 440; k++) {
angle1 = int(random(360));
angle2 = angle1+int(random(5*5, 7*5));
radius1 = int(random(190*5, 290*5));
radius2 = int(random(210*5, 310*5));
if (radius1 > radius2){
diffValue = radius1-radius2;
} else {
diffValue = radius2-radius1;
}
if (diffValue < 5*5){
radius2 += 10*5;
}
line(radius1*cos(radians(angle1)), radius1*sin(radians(angle1)), radius2*cos(radians(angle2)), radius2*sin(radians(angle2)));
}
popMatrix();
save("explody scircle.png");
print("done");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment