Sunday, September 29, 2013

Processing 2 example: pushMatrix() and popMatrix()

Example of using pushMatrix() and popMatrix() of Processing 2:



void setup() {  // setup() runs once
  size(400, 300);
  background(255);
}

void draw() {
  
  pushMatrix();
  translate(200, 50);
  ellipse(50, 50, 100, 100);
  popMatrix();
  ellipse(50, 50, 100, 100);
}


No comments:

Post a Comment