Home | | Syllabus | | Assignments | | Documentation

    Solution to Assignment 1


    Problem 1:

    Objects in the distance have smaller images than those that are close when projected onto an image plane with perspective projection. The projection of images through the lens of the eye can be modelled (approximately) as perspective projection, and so objects that are farther away will have smaller images. To see this mathematically, recall the equations for the projected image point (x,y) from a point P in the world (X, Y, Z) are given by:

      x = Xd/Z
      y = Yd/Z
    for a camera with focal length d and the image plane in front of the image plane. Thus as Z increases, x and y decrease. Thus an object whose height is Y, will project to a smaller sized image as Z increases, as diagrammed below:

    This idea of image size varying with distance is not intuitively obvious when you think about your own visual field. This is because your brain automatically compensates for the smaller images, so that things in the distance look (for the most part) their right size. This is known as "Size constancy" in the psychology literature. This is probably one of the reasons it took so long for painters to work out the theories underlying the use of perspective in drawing and painting.


    Problem 2:

    a) Given the equations for perspective projection, with d = 1, the four points project as follows:

      Recall that x = Xd/Z; y = Yd/Z;

      P1: (0.5, 0.5, 1.0); x1 = .5/1, y1 = .5/1; p1 = (0.5, 0.5);

      P2: (1.0, 0.0, 1.0); p2 = (1.0, 0.0);

      P3: (0.0, 0.0, 1.0); p3 = (0.0, 0.0);

      P4: (1.0, 1.0, 2.0); p4 = (0.5, 0.5);

    Note that P1 and P4 project to the same point on the image plane. The projection is drawn in the figure below:

    b) Now, the observer takes a step back, so Z increases by 1. We now have the following projections:

      P1: (0.5, 0.5, 2.0); x1 = .5/2, y1 = .5/2; p1 = (0.25, 0.25);

      P2: (1.0, 0.0, 2.0); p2 = (0.5, 0.0);

      P3: (0.0, 0.0, 2.0); p3 = (0.0, 0.0);

      P4: (1.0, 1.0, 3.0); p4 = (0.33, 0.33);

    Now P1 and P4 do not project to the same point, as shown below:

    c) The image in part a looks like a triangle, and one might assume it arose from a simple, connected triangle in space. The image in part b is no longer a simple triangle, since one of the edges extends out past the top vertex. If one saw these two images side by side, one would probably assume they arose from different objects. This illustrates how one's (or the camera's) viewpoint can have a large affect on one's interpretation of the image. If simply moving one step back can cause such a change in the image, imagine what could happen if you rotated the camera!


    Problem 3: Spirals

    Here is one solution:

    C code for solution to spiral problem


    Home | | Syllabus | | Assignments | | Documentation


    Constance Royden--croyden@mathcs.holycross.edu
    Computer Science 384
    Date Created: August 17, 1999
    Last Modified: September 17, 2001
    Page Expires: August 17, 2002