mirror of
https://github.com/processing/processing4.git
synced 2026-02-17 20:35:38 +01:00
24 lines
346 B
Plaintext
24 lines
346 B
Plaintext
// The Nature of Code
|
|
// Daniel Shiffman
|
|
// http://natureofcode.com
|
|
|
|
class Particle {
|
|
PVector location;
|
|
|
|
Particle() {
|
|
location = new PVector();
|
|
}
|
|
|
|
void setLocation(float x, float y) {
|
|
location.x = x;
|
|
location.y = y;
|
|
}
|
|
|
|
void display() {
|
|
fill(random(255));
|
|
ellipse(location.x,location.y,16,16);
|
|
}
|
|
|
|
|
|
}
|