Evolving line (easy)
in
Programming Questions
•
1 years ago
I made this script... but the line is only moving on a certain path.
- float x;
float y;
float newX;
float newY;
void setup() {
background(0);
stroke(255);
size(1000, 700);
smooth();
}
void draw() {
x = newX;
y = newY;
newX = x + random(20);
newY = Y + random(20);
line(x, y, newX, newY);
}
1