> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://playgramming.sketchpad.cc/sp/pad/view/ro.BUsIHhJRyM0/rev.976
 * 
 * authors: 
 *   Heather Dove
 *   Joe Matula
 *   Carlos Revollo
 *   Bryan Cupp
 *   Steven Gale
 *   Jamie Kerr
 *   Pat Moeller
 *   Armando Izquierdo
 *   Andy Thai
 *   ryan reynolds
 *   Devon Scott-Tunkin
 *   Drew Turk
 *   Christopher Johnson
 *   Katherine Trela
 *   Ian Nutter
 *   Jordan Wallace

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



// Pressing Control-R will render this sketch.

// this demonstrates creating a variable
int x = 50;

void setup() {  // this is run once.  
    size(400, 400); // this sets the size of your canvas 
} 

void draw() {  // this is run repeatedly. 
    // demonstrates drawing a red ellipse with a green stroke 
    // at position 40px, 40px in the top left corner and size 30px x 50px
    fill(255, 0, 0);
    stroke(0, 255, 0);
    ellipse(40, 40, 30, 50); 
    
    // this demonstrates using the function we defined below
    // this turns off fill
    noFill();
    //this turns off stroke
    noStroke();
    drawSquare(x, x);
    
    // this demonstrates using a random color
    fill(random(255), random(255), random(255)); 
    
    // using function with
    drawSquare(random(200), random(200), random(200)); 
}

// this just demonstrates writing a function
void drawSquare(int positionX, int positionY, int w) {
    rect(positionX, positionY, w, w);    
}