Created
August 11, 2015 05:45
-
-
Save jbum/486d4386f48ad08596b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage myImage; | |
void setup() | |
{ | |
size(500,500); | |
myImage = loadImage("test.png"); | |
} | |
void draw() | |
{ | |
background(255); | |
float speedOfRotation = .01; // higher values go faster, e.g. .02 is double speed | |
float amtToRotate = millis()*speedOfRotation; | |
int x = 100, y = 100; // where to place the image | |
pushMatrix(); | |
translate(x,y); | |
rotate(amtToRotate); | |
image(myImage, -myImage.width/2, -myImage.height/2); | |
popMatrix(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment