Last active
August 29, 2015 14:14
-
-
Save alisonpope/18bd555aa750d1c88b7e to your computer and use it in GitHub Desktop.
Data Visualisation Course Week 2
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
// Draws a small image at the current mouse position. | |
// Jo Wood, 3rd February, 2015 | |
// Modified by Alison Pope, 6 February, 2015 | |
// Simple Processing sketch that loads an image of me that | |
// moves around the screen. | |
PImage img; | |
void setup() | |
{ | |
size(400,320); | |
// Load the image from a local file. | |
img = loadImage("https://ajpcv.files.wordpress.com/2014/08/profilepic_50.jpg"); | |
// Position image so it is centred at the given coordinates. | |
imageMode(CENTER); | |
} | |
void draw() | |
{ | |
background(255); | |
// Draw the image centred on the current mouse position. | |
image(img,mouseX,mouseY); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment