topical media & game development

talk show tell print

graphic-processing-learning-10-example-10-6-example-10-6.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 10-6: Simple raindrop behavior
  
  // Variables for drop location
  float x,y; 
  
  void setup() {
    size(400,400);
    background(0);
    x = width/2;
    y = 0;
    smooth();
  }
  
  void draw() {
    background(255);
    // Display the drop
    fill(50,100,150);
    noStroke();
    ellipse(x,y,16,16);
    // Move the drop
    y++ ;
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.