IS2780 students, Some hints on the perspective part of asn02. There shouldn't be any special cases in the perspective_project() function for different z values. That is, exactly the same mathematical operations apply in all cases so long as the eye stays in front of the cube... (DON'T WORRY about what happens if you move the eye further in than the front of the cube!!!) The visual motion of the cube should be entirely smooth as you move the eye in XY or drag the cube. Similarly, there should not be any discontinuous jumps as you move the eye position in or out using the "i' and 'o' keys. If these things happen then you're probably doing something as an integer calculation rather than float. A good way to see if your results are correct is to use a ruler to measure the lengths of the front, middle and rear cube edges as they appear on your screen with the cube kept in its unrotated and untranslated position. For the start (or reset) position on my screen the green mid level (ie. z==0) edges of the cube happen to be 3 inches long. Since the cube edges are 4 world units we now know that one world unit actually corresponds to 0.75 inches on my screen. (The actual length on your screen may be different depending on your particular display size and resolution.) Note that initially these green lines are 16 Z units from the eye and their lengths do not change as we drag the eye position in XY. We can think of the Z=0 plane as the basic reference scale and things that are closer or further from the eye must be drawn accordingly larger or smaller. The eyez at 16 also tells us that the correct viewing distance from my screen is 0.75 inches * 16 = 12 inches. As discussed in class the projected size on the sreen is proportional to the z distance from the eye. Therefore we can calculate the length of the rear cube edges, that are 18 Z units from the eye, should be 16/18ths as long as the green reference plane lines so that is 2.67 inches. Similarly the front blue edges, that are initially 14 units from the eye, project to 3*16/14 inches or ~3.43 inches. Again, your inch values may be different but the ratios will be the same. In your program you will of course compute these relative magnifications based on the current eye position, view_plane_z and of course the XYZ of the point you are projecting. (Recall I said you can assume view_plane_z stays at 0 but you can change that later after the rest is working if you want.) Now test a special case that is easy to check... Use the 'i' key to move the eye in to Z=6 units. At that position the front face of the cube, at z = 4, is only half as far from the eye as the rear face which is still at z = 8. Therefore the front face lines should now be exactly twice as long as the rear face lines. The rear cube edges are now 3*6/8 = 2.25 inches and the front edges 3*6/4 = 4.5 inches. (The size of the P was also chosen so that for this position its top should now just touch the height of the top rear edge.) If you drag the eye XY position you will see that none of the front, mid or rear cube edges change length although the diagonal projections of the front to rear edges definately change. The size of the world units has not changed just because the eye is now nearer to the screen. So, for eyez=6 the correct viewing position is only 4.5 inches from my screen. This explains the exagerated perspective which is the same as you would get by holding a real 3inch cube this far from your eyes or equivalently looking into a cubical room that would be 8*8*8 feet at 1 foot per world unit while standing 12 feet from the middle of the room. (ie. you would be 8 feet away from the near wall and 16 feet from the far wall.) For the purpose of this assignment don't worry about what happens to points that reach z=0 relative to the eye or that go behind the eye. In most situations we would remove those points from the viewing frustum according to a near clipping plane. (I guess I said that earlier) I hope this helps!!!! Art