Example
// Learning Processing
// Daniel Shiffman
// http://www.learningprocessing.com

// Example 2-1: Zoog again
size(200,200);  // Set the size of the window
background(255);  // Draw a white background 
smooth(); 

// Set ellipses and rects to CENTER mode
ellipseMode(CENTER);
rectMode(CENTER); 

// Draw Zoog's body
stroke(0);
fill(150);
rect(100,100,20,100);

// Draw Zoog's head
fill(255);
ellipse(100,70,60,60); 

// Draw Zoog's eyes
fill(0); 
ellipse(81,70,16,32); 
ellipse(119,70,16,32);

// Draw Zoog's legs
stroke(0);
line(90,150,80,160);
line(110,150,120,160);

2 Comments

»

  1. 6 lines down you have:
    “background(255); // Draw a black background”

    shouldn’t this be:

    background(255); // Draw a WHITE background

    ?

    Comment by brett burton — August 1, 2009 @ 10:49 am

  2. Yes, fixed, thank you!

    Comment by admin — August 5, 2009 @ 1:40 pm

Leave a comment