Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int step = 30;
- float x, y;
- void setup() {
- size(1280, 747);
- background(0);
- fill(255); //fill(0, 80);
- noStroke();
- y = x = width/2;
- }
- void draw() {
- circle(x, y, 5);
- x += random(-step, step);
- y += random(-step, step);
- //println (x, '\t', y);
- if (x < 0)
- x = 0;
- if (y < 0)
- y = 0;
- if (x > width)
- x = width;
- if (y > height)
- y = height;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement