Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup() {
- createCanvas(400, 400);
- frameRate(60);
- }
- function draw() {
- time = millis() / 1000.0;
- background(0);
- hw = width/2;
- hh = height/2;
- t = time * 4.0;
- x = 1 + 0.5 * Math.sin(t);
- y = 1 + 0.5 * Math.cos(t);
- s = 0.75 + 0.25 * Math.cos(t/2.0);
- fill(255);
- circle(hw * x, hh * y, min(hw, hh)*0.75 * s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement