PSystem ps; Particle p[]; void setup() { size(600,600); ps = (PSystem)loadPlugin("PSystem"); ps.defaultSpringRestLength = 0.2; ps.defaultSpringStrength = 0.0004; Particle p[] = new Particle[100]; for (int i = 1; i < 100; i++) { // creates particles float webX; float webY; float radius = i*18; webX = radius * cos(i*45) + 900; // position for each particle on X axis webY = radius * sin(i*45) + 900; // position for each particle on Y axis p[i] = new Particle(webX/3, webY/3, 0); ps.addParticle(p[i]); } for (int j = 1; j < 99; j++) { //primary (linear) springs ps.addSpring(p[j], p[j+1]); } for (int k = 1; k < 94; k++) { //secondary springs ps.addSpring(p[k], p[k+6]); } for (int m = 94; m < 100; m++) { //fixed frame p[m].fix(); } ps.setGravity(0, 0, -0.00001); //pulls 'down' } void loop() { background(255, 204, 0); ps.draw(); }