/** * Basic shapes. * *

Elie Zananiri
* CART 253, Winter 2008

*/ size(400, 400); smooth(); background(255); // draw a line from (200,10) to (210,380) line(200, 10, 210, 380); // use fill() to specify what color should be inside the shape fill(100, 100, 200); // blue // draw a rectangle with the upper left-hand corner at (25,50) // and its width and height both equal to 100 rect(25, 50, 100, 100); // use fill() to specify what color should be inside the shape fill(255, 100, 0); // orange // use stroke() to specify the color of the outline stroke(100, 100, 255); // blue // draw an ellipse centered at (280,150), with // its width equal to 100, and its height equal to 75 ellipse(280, 150, 100, 75); // use strokeWeight() to specify the width of the outline strokeWeight(3); // draw a triangle with points at (30,275), (58,225), and (186,350) triangle(30, 275, 58, 225, 186, 350); // use noStroke() to not draw an outline noStroke(); // use fill() to specify what color should be inside the shape fill(185, 17, 39); // red // draw a quad with points at (240,240), (390,320), // (360,380), and (220,350) quad(240, 240, 390, 320, 360, 380, 220, 350);