// Based on Greenberg Appendix A-13 Spring[] springs = new Spring[30]; void setup() { size(400,300); smooth(); // Evenly space the springs across the window, // with a bit of margin (25 on each side) float boxR = 0.5*(width-50.0)/springs.length; float x0 = 25 + boxR; for (int i=0; i