diff --git a/java/examples/3D/Camera/OrthoVSPerspective/OrthoVSPerspective.pde b/java/examples/3D/Camera/OrthoVSPerspective/OrthoVSPerspective.pde index f91fec7b7..9c9a0ff1d 100644 --- a/java/examples/3D/Camera/OrthoVSPerspective/OrthoVSPerspective.pde +++ b/java/examples/3D/Camera/OrthoVSPerspective/OrthoVSPerspective.pde @@ -27,11 +27,11 @@ void draw() if(mousePressed) { float fov = PI/3.0; - float cameraZ = (height/2.0) / tan(PI * fov / 360.0); + float cameraZ = (height/2.0) / tan(fov/2.0); perspective(fov, float(width)/float(height), cameraZ/2.0, cameraZ*2.0); } else { - ortho(-width/2, width/2, -height/2, height/2, -10, 10); + ortho(0, width, 0, height); } translate(width/2, height/2, 0);