Skip to content

Instantly share code, notes, and snippets.

@jordanorelli
Last active August 29, 2015 13:56
Show Gist options
  • Save jordanorelli/8812915 to your computer and use it in GitHub Desktop.
Save jordanorelli/8812915 to your computer and use it in GitHub Desktop.
Particle p;
void setup() {
size(500, 500);
background(255);
p = new Particle(width*0.5, height*0.5, 1);
}
void draw() {
background(255);
p.draw();
}
class Particle extends PVector {
Particle(float x, float y, int whatever) {
this.x = x;
this.y = y;
}
void draw() {
pushMatrix();
translate(this.x, this.y);
ellipseMode(RADIUS);
ellipse(0, 0, 20, 20);
popMatrix();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment