/** * midpoints01 * * Matthew Conroy (www.madandmoonly.com) * **/ PImage canvas1; int numPoints=1000; float xx [] = new float [numPoints]; float yy [] = new float [numPoints]; int color0=0; float borderFactor=0.05; int its=10; void setup (){ size(600, 600); canvas1 = createImage(600,600,RGB); // noLoop(); for (int i=0; imaxX) { maxX=xx[i]; } if (yy[i]maxY) { maxY=yy[i]; } } xx[numPoints-1]=0.5*(xx[numPoints-1]+xx0); yy[numPoints-1]=0.5*(yy[numPoints-1]+yy0); if (xx[numPoints-1]maxX) { maxX=xx[numPoints-1]; } if (yy[numPoints-1]maxY) { maxY=yy[numPoints-1]; } //rescale for (int i=0; i