0. Reading in the cube

First I read in the cube from two csv files. The file “vertices.txt” file contains the 8 coordinates of the cube and “edges.txt” contains the edge information. Plotting its image below using the in built R function.

The cube is in the negative z half of the 3-D coordinate system and with edges oriented parallel to the coordinate axis and each edge is 1 unit long. The x limits of the cube are from 4 to 5. The y limits are from 4 to 5 and the z limits are from -4 to -5. We call the line x= 4.5 and y = 4.5 the axis of the cube.

The above view is from some awkward position but in the report below we will view the cube from the positive z half of the coordinate system. I will fix some x,y coordinate and change the z coordinate to see the change in output.

1.1 Viewing head-on

In this we fix the eye on the axis of the cube and get a head on view.

We position the viewer’s x and y coordinate at the axis (x = 4.5,y = 4.5) and move away from the image parallel to the z axis. Also I paint the front face of the cube as red.

We can see that as we move away the rays become more and more paraxial so the back face and front face start to coincide.

However this does not give the effect of the cube becoming smaller as we move away. To fix that I change the size of the by modifying the range of the x and y axis to be plotted. But this is a manual method so I avoid it after the below plots.

1.2 Viewing head-on (with size effect of distance)

We position the viewer’s x and y coordinate at (4.5, 4.5) and move away from the image parallel to the z axis.

2 Viewing from slightly right of center

Now we move away from the axis and observe from the right of the axis without changing the height of the camera. We position the viewer’s x and y coordinate at (9, 4.5) and move away from the image parallel to the z axis.

We can see that with distance the effect of line of vision becoming paraxial.

3. Viewing from slightly above the center

Now we move the eye slightly above the axis but don’t move left or right. We position the viewer’s x and y coordinate at (4.5, 9) and move away from the image parallel to z axis.

Again we see desired effect of increasing distance of viewing

4. Viewing from slightly right and slightly above center

Now we move the eye both a little bit to the right and above. We position the viewer’s x and y coordinate at (9, 9) and move away from the image parallel to the z axis.

We see the desrived effect of distance.

End of report