Sunday, September 29, 2013

Processing 2 example: translate()

Example of using translate(x, y) of Processing 2:

Processing 2 example: translate()
Processing 2 example: translate()


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

void draw() {
  rect(50, 50, 100, 100);
  translate(200, 50);
  rect(50, 50, 100, 100);
}


No comments:

Post a Comment