35 lines
719 B
Plaintext
35 lines
719 B
Plaintext
// Adapted from "Lines bw" by ro7rossetti
|
|
// https://openprocessing.org/sketch/923148
|
|
|
|
float radius = 5;
|
|
|
|
void setup() {
|
|
fullScreen();
|
|
background(0);
|
|
noFill();
|
|
stroke(255);
|
|
noCursor();
|
|
}
|
|
|
|
void draw() {
|
|
translate(width/2, height/2);
|
|
beginShape();
|
|
for (int deg = 0; deg <= 360; deg+=1) {
|
|
float angle = radians(deg);
|
|
float x = cos(angle);
|
|
float y = sin(angle);
|
|
float n = noise(angle, frameCount*0.005);
|
|
//float n = noise(x, y, frameCount*0.01); // noise(a) = noise(-a);
|
|
//float n = noise(x+frameCount*0.005, y+frameCount*0.005);
|
|
x *= n*radius;
|
|
y *= n*radius;
|
|
vertex(x, y);
|
|
}
|
|
endShape();
|
|
radius+=5;
|
|
if (radius>width*2) {
|
|
radius = 5;
|
|
background(0);
|
|
}
|
|
}
|