// draw the cones pushMatrix();
// -10 means the cones are below the surface
// (so we can draw on top of them later) translate(0,0,-10); for (int i = 0; i < NUM_POINTS; i++) { fill(c); noStroke();
// if you have more points, use a smaller radius
// (but you risk having gaps)
cone(x,y,200.0,10.0);
} popMatrix();
// give user control of first point
x[0] = mouseX;
y[0] = mouseY;
// just inits the points of a circle,
// if you're doing lots of cones the same size
// then you'll want to cache height and radius too staticvoid coneDetail(int det) {
coneDetail = det;
unitConeX = newfloat[det+1];
unitConeY = newfloat[det+1]; for (int i = 0; i <= det; i++) { float a1 = TWO_PI * i / det;
unitConeX = (float)Math.cos(a1);
unitConeY = (float)Math.sin(a1);
}
}