PSystem ps; Particle p[]; void setup() { size(600,600); ps = (PSystem)loadPlugin("PSystem"); ps.defaultSpringRestLength = 0.2; ps.defaultSpringStrength = 0.005; Particle p[] = new Particle[100]; for (int v = 1; v < 74; v=v+6) { // 72/6=12 offsets for web for (int i = v; i < v+6; i++) { // defines each one of the offsets float webX; float webY; float radius = i*6; webX = radius * cos((TWO_PI / 6)*i) + 300; // position for each particle on X axis webY = radius * sin((TWO_PI / 6)*i) + 300; // position for each particle on Y axis p[i] = new Particle(webX, webY, frame); ps.addParticle(p[i]); // particle drawn if (i>1) { ps.addSpring(p[i], p[i-1]); // springs in one offset } if (i>6) { // springs in between offsets ps.addSpring(p[i], p[i-6]); } } } for (int m = 73; m < 79; m++){ // fixes outermost offset p[m].fix(); } ps.setGravity(0, 0, -0.4); // pulls the web 'down' } void loop() { stroke(200, 50, 90); // web color if (mouseX < 300 && mouseY < 300) { ps.setGravity(mouseX/100, mouseY/1000, mouseY/1000); } else { ps.setGravity(-mouseX/100,-mouseY/1000, mouseY/1000);//variable gravity with mouse } //be gentle background(0, 0, 0); ps.draw(); } //thanks Axel.