I'm working on a method of visualizing solids of revolution in 3D using Processing. Currently, I'm able to draw all 3 axes, revolving around the Y as well as the shape I want to revolve around one of the axes.
I want to clear the axes from the screen each time so that they look like they're rotating in each frame, but I don't want to clear the shape from rotating as that is needed to create the solid of revolution visual. Not sure how to do this - any ideas?
Here's my current draw loop:
void draw() {
background(0);
camera(width/2.0, map(mouseY,0,height,-height/2 - PADDING ,height/2 + PADDING), (height/2.0) / tan(PI*30.0 / 180.0),
width/2.0, height/2.0, 0, 0, 1, 1);
translate(width/2,height/2);
rotateY(inc);
pushMatrix();
rotateY(inc2);
shape(plotFunc());
popMatrix();
plotAxes();
inc2 += 0.1;
inc += 0.010;
} //draw;