Files
processing4/java/examples/Books/Nature of Code/chp3_oscillation/OOPWaveParticles/Particle.pde

21 lines
278 B
Plaintext

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);
}
}