Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created January 31, 2015 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeroeth/6d2b1995f1d3e1fbdf35 to your computer and use it in GitHub Desktop.
Save zeroeth/6d2b1995f1d3e1fbdf35 to your computer and use it in GitHub Desktop.
random cubes
int square_top_x = 10;
int square_top_y = 20;
int square_bot_x = 100;
int square_bot_y = 200;
void setup()
{
size(500, 500);
}
void draw()
{
square_bot_x = int(random(width));
square_bot_y = int(random(height));
rect(square_top_x, square_top_y, square_bot_x, square_bot_y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment