Advertisement
xeromino

accident

Oct 26th, 2013
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. int x, y;
  2. float sz, edge, theta;
  3.  
  4. void setup() {
  5.   size(500, 500);
  6.   background(#431126);
  7.   sz = width/3;
  8.   x = width/2;
  9.   y = height/2;
  10.   rectMode(CENTER);
  11. }
  12.  
  13. void draw() {
  14.   background(#431126);
  15.   fill(#ECE3B7);
  16.   stroke(#AA7868);
  17.   strokeWeight(10);
  18.   edge = map(sin(theta), 0, 1, 0, sz);
  19.   rect(x, y, sz, sz, edge);
  20.   theta += 0.0523;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement