Skip to content

Instantly share code, notes, and snippets.

@kebot
Created October 28, 2014 05:38
Show Gist options
  • Save kebot/7ebdbbea20d5974d8416 to your computer and use it in GitHub Desktop.
Save kebot/7ebdbbea20d5974d8416 to your computer and use it in GitHub Desktop.
Processing
int stepSize = 5;
int r = -45;
draw() {
rotate(radians(r));
r += stepSize;
if (r > 45) {
stepSIze = -5;
} else if (r < -45 {
stepSize = 5;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment