Wednesday, November 5, 2008

test 3

  1. var p = Processing(CanvasElement);

  2. p.size(100, 100);

  3. p.background(0);

  4. p.fill(255);

  5. p.ellipse(50, 50, 50, 50);class Spin {

  6.   float x, y, speed;

  7.   float angle = 0.0;

  8.   Spin(float xpos, float ypos, float s) {

  9.     x = xpos;

  10.     y = ypos;

  11.     speed = s;

  12.   }

  13.   void update() {

  14.     angle += speed;

  15.   }

  16. }

test 2


var p = Processing(CanvasElement);
p.size(100, 100);
p.background(0);
p.fill(255);
p.ellipse(50, 50, 50, 50);

test

Original Processing.org Example: StatementsComments




// All Examples Written by Casey Reas and Ben Fry
// unless otherwise stated.


// The size function is a statement that tells the computer
// how large to make the window.
// Each function statement has zero or more parameters.
// Parameters are data passed into the function
// and used as values for specifying what the computer will do.
size(200, 200);

// The background function is a statement that tells the computer
// which color to make the background of the window
background(102);