Labels

Thursday, 31 May 2012

DSDN 142 - New code

Here we have some new rotational code which makes the "lollies" twirl but again I think I might change lollies to some kind of insect.

CODE:
void Thecircle() {
    pushMatrix();
    translate(x, y);
    rotate(rot);
    rot = rot+0.1;
    translate(-x, -y);
    ellipse(x, y, 20, 20);
    rect(x+5, y+5, 10, 10);
    rect(x-5, y-5, 10, 10);
    rect(x-15, y-15, 10, 10);
    popMatrix();
  }
}  
And also here are some images of my process when the mouse is clicked and not clicked.

No click
Clicked and held

No comments:

Post a Comment