I'm writing a program to have a ball bounce into a hole in a large box.
I'm rendering in P3D and want to make the hole without using vertexes.
How can I use a boolean function to subtract a cylinder from the box?
the code for the box is:
void _box(){
strokeWeight(3);
stroke(0);
fill(100,100,255);
translate(width/2,height/2+100);
beginShape(QUADS);
//right side
vertex(300,0,200);
vertex(300,0,-200);
vertex(300,125,-200);
vertex(300,125,200);
//left side
vertex(-300,0,200);
vertex(-300,0,-200);
vertex(-300,125,-200);
vertex(-300,125,200);
//top
vertex(300,0,200);
vertex(300,0,-200);
vertex(-300,0,-200);
vertex(-300,0,200);
//bottom
vertex(300,125,200);
vertex(300,125,-200);
vertex(-300,125,-200);
vertex(-300,125,200);
//back
vertex(300,0,200);
vertex(300,125,200);
vertex(-300,125,200);
vertex(-300,0,200);
//front
vertex(300,0,-200);
vertex(300,125,-200);
vertex(-300,125,-200);
vertex(-300,0,-200);
endShape(CLOSE);
}
1