diff --git a/version_final.pde b/version_final.pde index 07f120f..d061c7d 100644 --- a/version_final.pde +++ b/version_final.pde @@ -38,10 +38,22 @@ float vScaler = 0.00; float vRotateX = 1.18; float vRotateY = 0.00; float vRotateZ = 1.25; +//float vRotateX = 0; +//float vRotateY = phi; +//float zRotateZ = the; int rColor = 128; int bColor = 128; int gColor = 128; +// define variables for functionBox +int functionBoxResult = -1; +float zVariable = 0.0; +float xVariable = 0.0; +float yVariable = 0.0; +Textarea xv; +Textarea yv; +Textarea zv; + void setup() { size(1000, 681, P3D); noStroke(); @@ -68,45 +80,56 @@ void draw() { popMatrix(); hint(DISABLE_DEPTH_TEST); - //Drawing the coordinate system and points by the 3D point sets - pushMatrix(); - camera(mouseX, mouseY, (height/2) / tan(PI/5), width/2, height/2, 0, 0, 1, 0); - moveCoords(); - scalerCoords(); - smooth(); - stroke(255); - rotateCoords(); - noFill(); - - for (int i=0; i<500; i += 20){ - stroke(96); - line(i, 0, 0, i, 0, 500); - line(0, i, 0, 0, i, 500); - line(0, 0, i, 0, 500, i); - line(i, 0, 0, i, 500, 0); - line(0, 0, i, 500, 0, i); - line(0, i, 0, 500, i, 0); - } + if (functionBoxResult == -1){ + //Drawing the coordinate system and points by the 3D point sets + pushMatrix(); + //camera(mouseX, mouseY, (height/2) / tan(PI/5), width/2, height/2, 0, 0, 1, 0); + controlCamera(); + moveCoords(); + scalerCoords(); + smooth(); + stroke(255); + rotateCoords(); + noFill(); - strokeWeight(1); - //z-coordinate: red - stroke(255, 0, 0); - line(0, 0, -500, 0, 0, 500); - arrow(0, 0, 500); - //y-coordinate: green - stroke(0, 102, 0); - line(0, -500, 0, 0, 500, 0); - arrow(0, 500, 0); - //x-coordinate: blue - stroke(0, 76, 153); - line(-500, 0, 0, 500, 0, 0); - arrow(500, 0, 0); - - for (int i=0; i