Programming for Poets 2010-05-06

From Noisebridge
Revision as of 14:25, 11 May 2010 by Jtfoote (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

We began with the"getting started" tutorial

We covered a little about

  • coordinate system
  • variables
  • program flow
  • functions

And finished by editing a simple "pong paddle" program:

void setup() {
      // size of our drawing window
      size(400, 400);
      // set the background color to gray

void draw() {
      // this is a comment
       // draw over the box we drew last time (at old mouse pos)
      fill(128); // gray

      fill(255); //white
      // draw the new box at the new mouse position

// draw a paddle-shaped box at the given coordinates
void drawbox(int x, int y) {
Personal tools