Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x, y;
- float sz, edge, theta;
- void setup() {
- size(500, 500);
- background(#431126);
- sz = width/3;
- x = width/2;
- y = height/2;
- rectMode(CENTER);
- }
- void draw() {
- background(#431126);
- fill(#ECE3B7);
- stroke(#AA7868);
- strokeWeight(10);
- edge = map(sin(theta), 0, 1, 0, sz);
- rect(x, y, sz, sz, edge);
- theta += 0.0523;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement