Main Menu | The Perspective Assistant | Project Write-Up | Contact Information
The Perspective Assistant
A Java Applet by David Anderson, Stanford '01

The Perspective Assistant is a teaching tool designed to interactively demonstrate the basic principals of perspective drawing through a platform independant JAVA applet.

Try The Perspective Assistant

Project Write-Up

Why Did I Create the Perspective Assistant?

A Teaching Tool
I designed the Perspective Assistant as a tool for teaching the basic principles of persepective drawing. As such, the Perspective Assistant aims to help students of perspective gain an intuitive understanding of why perspective works. While one can draw an object in perspective on paper, only the Perspective Assistant gives a student the power to interactively move viewpoints and rotate objects within a completed perspective drawing. After using the Perspective Assistant, manipulating a perspective drawing in real time, I hope the student will come away with a solid grasp of the geometric principles of perspective construction.

Furthermore, as a teaching tool, the aims of the Perspective Assistant have certain limits. Mainly, the Perspective Assistant is not intended for architectual rendering or production. The Perspective Assistant is meant to teach, not produce accurate architectual plans.

How Did I Build the Perspective Assistant?

Object Oriented Design
First, because I needed flexibility and expandability, I engineered the Perspective Assistant using an object oriented design. Early on, I realized that when modeling objects, points, and lines, object oriented design provided an ready made, flexible datastructure. By using object oriented design, I gained the flexibility to make small adjustments to my program without rewriting much of the code.

Similarly, because the objects (classes) themselves are generic and reusable, should I choose to expand the program to incorporate new functions, or write other new teaching tools, I will be able to reuse the objects, saving time and energy.

The JAVA programming language allowed me to easily ditribute the Perspective Assistant to interested students over the web. Also, since java applets are integrated into most popular web browsers, no special software or technical knowledge is required -- the applet blends right into the page. Unfortunately, since the "Just-in-Time" compiler on most web browsers is still quite slow, I was afraid I might have a performance problem. However, since the project does not require a high level of calculations or user interaction, I figured the performance loss would be minimal. Overall, as a cross-platform, web-integrated, object oriented programming language, JAVA was the perfect choice for this project.

Problems I Encountered
First, I encountered problems arranging the different components of the display to balance usability and aesthetic appeal. Given the limited size of a web page, I had a relatively small area to work with. Unfortunately, when drawing even a simple cube from a steep angle, the perspective drawing can become extremely distorted. To view, the full distortion, I needed a lot of space.

To fix this problem, I put certain limits on the freedom the user has with the viewpoint and truncated the perspective view. By limiting the range of motion for the viewpoint, I limited the potential perspective distortion to more managable levels. Nevertheless, the the perspective drawing was still occasionally too large for the display. As such, when the drawing is too large for the display, the applet draws only the portion of the perspective view that fits on the display.

To maintain its cross-platform capability, I had to rewrite the program in a primitive version of JAVA. JAVA 1.1, is supported by most development environments and the latest web browsers. However, earlier web browsers like Netscape 3.01 only support JAVA 1.01. As such, they could not compile and run my JAVA 1.1 applet. To fix this problem, I looked up the JAVA 1.01 specifications and deprecated my function calls to meet these standards.

What Can the Perspective Assistant Do? (A User's Manual)

Understanding the Program Display
The program display consists of 11 independant interactive elements. Each element is identified in the following diagram and explained in the subsequent text.

Moving the Viewpoints
To move a viewpoint, first place the pointer over either the plan viewpoint or the side viewpoint. Click and drag the mouse to move the viewpoint. The viewpoints have a limited scope of movement and become highlighted when selected for movement.

Rotating the Model
To rotate the model, first move the pointer over either the plan projection or side projection. Click and drag the mouse to rotate the object. Each projection allows rotation along two axis. The projection will become highlighted when selected.

Choosing a Model
To choose a different model, click and drag the pull-down model menu at the top of the screen. Highlight the object you desire and release. The new model should display immediately. If not, see the section on bugs.

Toggling Perspective Lines
To toggle the red perspective lines, use the checkbox labeled "Perspective Lines" at the top of the display.

Toggling Construction Lines
To toggle the gray construction lines, use the checkbox labeled "Construction Lines" at the top of the display.

Clickable Perspective Lines
When you place the pointer over a vertex on the perspective view, the perspective lines for that vertex will appear in purple. If you click on one of the perspective view vertices, you can turn on the purple perspective lines for that vertex. Click again to turn the purple perspective line off.

How Could the Perspective Assistant Be Improved?

On some platforms, when one changes the model, the applet throws a "NullPointerException" error and doesn't redraw the new model. If this happens to you when choosing a model, simply click on one of the viewpoints. This will force the applet to redraw the display with the new model you selected.

Also, on the Apple Macintosh platform, the checkboxes often disappear after you toggle the perspective or costruction lines. This is a documented problem with the JAVA JIT compiler with Netscape for Macintosh and not a problem the Perspective Assistant. Should the checkbox disappear on your display, iconify the window, and then reopen it. This forces Netscape to redraw the applet, and the checkbox should reappear.

Found another bug? Contact David Anderson []

User Specified Models
Since the four models available on the pull-down menu are hard coded into the applet, there needs to be a method of inputing 3D models from the web. Ideally, the user could specify the URL for a VRML model. The applet would then query the webserver for the VRML model and load a wireframe version of the model into the display. Obviously, this would require scaling the model and simplifying models with a large number of vertices. Despite the work involved, the ability to load VRML models would make this applet a much more powerful teaching tool.

Perspective View Rotation
Intuitively, it feels like you should rotate the model from the perspective view, not the projection views. Ideally, the user could rotate the model from any of the three views in along all three axis.

Different Perspective Technique
Throughout the Renaissance, different artists and mathematicians developed a variety of methods for drawing in perspective, only one of which is demonstrated here. This applet could easily be made to demonstrate more than one perspective technique. It might be interesting to compare the perspective techniques pioneered by Brunellesci and Leonardo de Vinci inside the Perspective Assistant.

Other Demonstrations
Given the objects (classes) that I created to make this Perspective Assistant, it would be easy to create other geometric demonstrations. For exmaple, with a minimal amount of work, one could use the objects provided by the Perspective Assistant to create interactive demonstrations of Pythagorean Theorem Proofs or trigonometric functions. Indeed, the Perspective Assistant provides a highly expandable platform for building all sorts of geometric demonstrations.

Main Menu | The Perspective Assistant | Project Write-Up | Contact Information

David James Anderson
Updated: Mar 16, 1998