int nlines = 5; int nsamples = 50; float[][] xs = new float[nlines][nsamples]; int max_height; int pixels_per_sample; void setup() { size(800,400); smooth(); colorMode(HSB, 100); max_height = height / nlines; pixels_per_sample = width / nsamples; for(int i=0; i= 0; x--) vertex(x*pixels_per_sample, height-ys[0][x]); endShape(CLOSE); } }