Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Created October 6, 2016 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/25305eba24a754f0b1e4af403fd3ea3d to your computer and use it in GitHub Desktop.
Save LarsBergqvist/25305eba24a754f0b1e4af403fd3ea3d to your computer and use it in GitHub Desktop.
A minimal Processing example
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