I am trying to load several rectangles across the entire screen in random width and height sizes

void setup(){
  size(800,800);
  background(255);
}

void draw(){
for(int i = 0;  i <= 75; i++)
{
  float r,l;
   r = random(0,50);
   l = random(0, 800);
   rectMode(CENTER);
   fill(153);
   rect(l,l,r,r); 
 }
}

Answers

  • jesus christ. i really hope that no one answers this.

  • Answer ✓

    Hey now, everyone's got to start somewhere...

    You should look up in the reference what the four parameters to rect() do.

  • that's not my point. some people in this forum are ordering answers/solutions as if they are at a mc donalds drive in.

  • edited April 2014

    you mean like say "hello" or say "please" or make a whole sentence or say "thank you"...

    yes, it's true

    except people tend to be more polite in a mc donalds drive in.

  • look up in the reference what the four parameters to rect() do.

    each parameter needs its random number (or the first three)

  • you understand me, chrisir :) the good, old friendliness thing

  • long forgotten...

Sign In or Register to comment.