ianhi_processing/NatureOfCode/The-Nature-of-Code-Examples-master/Processing/chp4_systems/NOC_4_01_SingleParticle/NOC_4_01_SingleParticle.pde
// The Nature of Code
// Daniel Shiffman
// http://natureofcode.com

Particle p;

void setup() {
  size(800,200);
  p = new Particle(new PVector(width/2,20));
  background(255);
  smooth();
}

void draw() {
  background(255);
  
  p.run();
  if (p.isDead()) {
    p = new Particle(new PVector(width/2,20));
    //println("Particle dead!"); 
  }
}



