Codekids Lesson 1

What's Processing?

Time to learn some of the very cool things processing can do. Here's how:

  1. Start up Processing on your computer
  2. Choose Help -> Visit Processing.org
    Visit Processing.org
  3. Go to Learning -> Examples
    Examples
  4. Explore the examples to see and play with different short processing programs.
    Here are our class favourites from last year:
  5. If you find a new favorite, go WRITE IT ON THE WHITE BOARD.
  6. Each example has a sketch window (above) and the code (below):
    Example of how to create shapes

What does that stuff mean?!?!?!

size(200, 200);
make a window 200 pixels wide and 200 pixels tall
smooth();
draw smooth edges instead of jaggy ones
background(0);
paint the background color black
noStroke();
don't draw any lines
fill(226);
fill the shapes with light gray
triangle(10, 10, 10, 200, 45, 200);
make a triangle that starts at point 10,10, goes to point 20,200, and ends at point 45,200
rect(45, 45, 35, 35);
make a square that starts at point 45,45 and is 35 pixels wide and tall
quad(105, 10, 120, 10, 120, 200, 80, 200);
make a quadrilateral with the four corners at 105,10 120,10 120,200 and 80,200
ellipse(140, 80, 40, 40);
make a circle that starts at point 140,80 and is 40 pixels wide and tall
triangle(160, 10, 195, 200, 160, 200);
make another triangle from 160,10 to 195,200 to 160,200

Say WHAT?!?!?!?!?!?!?

OK, don't worry if you don't get that. We'll learn later. For now, just play around looking at the different examples.

 

Go back to the home page.