Created
October 6, 2016 11:17
-
-
Save LarsBergqvist/25305eba24a754f0b1e4af403fd3ea3d to your computer and use it in GitHub Desktop.
A minimal Processing example
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
void setup() { | |
size(400, 300); | |
rectMode(CENTER); | |
} | |
void draw() { | |
background(220); | |
fill(200,200,0); | |
rect(mouseX, height/2, mouseY/2+10, mouseY/2+10); | |
fill(0,200,200); | |
int inverseX = width-mouseX; | |
int inverseY = height-mouseY; | |
ellipse(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment