ParticleSystem ps;
PShape s;
float angle=0;
float aVelocity=0;
float aAcceleration=0.001;
void setup() {
size(240, 860);
ps = new ParticleSystem(new PVector(width/2, height-50));
}
void draw() {
background(255);
ps.addParticle();
ps.run();
}
void mousePressed(){
ps=(new ParticleSystem(new PVector(mouseX,mouseY)));
}
class Particle {
PVector location;
PVector velocity;
PVector acceleration;
float lifespan;
Particle(PVector l) {
// The acceleration
acceleration = new PVector(0, 0.05);
// circel's x and y ==> range
velocity = new PVector(random(-1, 1), random(-14, -1));
// apawn's posi