topical media & game development

talk show tell print

graphic-processing-learning-14-example-14-12-example-14-12.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 14-12: Rotating one square
  
  float theta1 = 0;
  
  void setup() {
    size(200,200,P3D);
  }
  
  void draw() {
    background(255);
    stroke(0);
    fill(175);
    rectMode(CENTER);
    
    translate(50,50);
    rotateZ(theta1);
    rect(0,0,60,60);
    
    theta1 += 0.02;
  }
  


(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.