8
edits
| Luanbo.Zhang (talk | contribs) | Luanbo.Zhang (talk | contribs)  | ||
| Line 568: | Line 568: | ||
| float rotationVal = 0; | float rotationVal = 0; | ||
| int distance = 0; | int distance = 0; | ||
| void setup(){ | void setup(){ | ||
|    size(1000, 1000); |    size(1000, 1000); | ||
| Line 576: | Line 574: | ||
|    smooth(); |    smooth(); | ||
| } | } | ||
| void mousePressed(){ | void mousePressed(){ | ||
|    // when mouse is pressed, the pattern will become bigger |    // when mouse is pressed, the pattern will become bigger | ||
| Line 582: | Line 579: | ||
|    distance = 150 ; |    distance = 150 ; | ||
| } | } | ||
| void mouseReleased(){ | void mouseReleased(){ | ||
|    distance = 0; |    distance = 0; | ||
| Line 646: | Line 642: | ||
|    rotate( -2 * rotationVal ); |    rotate( -2 * rotationVal ); | ||
|    rect(0, 0, 40, 40, 6); |    rect(0, 0, 40, 40, 6); | ||
|   } | |||
| } | |||
| ==Group D== | ==Group D== | ||
edits