Homework 5: Voluntary Frustrumation

Short Description:

Create a program that demonstrates the view frustum.

Goals

When you finish this homework, you should

Formal Description

Create a program that allows a user to explore how a view frustum works in a three dimensional world. The user is presented with a number of different models spread across the xz plane. These models are contained within an area between (-50,0,-50) and (50,50,50). These models can be static, or can be moving about if you wish. You should provide some type of "ground" upon which the user is walking and the models are standing. You may assume units in this world are approximately 1 ft. The user is presented with two different views of this world.

In the fist view, the user starts at (0,5,0) looking at (0,5,10) and can move only in the xz plane. The user may not step outside of the area described above and can not move in the y dimension. The user may look up or down, but will the look at position have a negative y value. The user should have control over the view frustum and be able to adjust x,y, near and far, where x and y are 1/2 the width and height of the near plane centered on the look at vector. The user should be provided with an interface that displays and allows control of movement and frustum configuration.

The second view is at a constant distance of 75 units from the origin, always looking at the origin, but can move about the sphere these constraints describe. The user should be able to move this camera anywhere in the hemisphere where the y coordinate is positive. Again, the user should have control over this camera with a user interface that provides the current value and allows easy adjustment. I would investigate spherical coordinates and allow control over the two angles. The frustum for this view need not be controllable, but should be set to display everything in the world below when in the default location.

The second view displays an avatar of the user, properly placed and oriented in the x,z plane with a visible view frustum in front of them. This frustum should match the characteristics of the frustum used in the first view. As the user moves, the frustum should move too. All objects visible in the first view should be visible in the second view (if they are inside the view frustum of the second view.

You should employ two viewports to display your two views, one camera in each. I envision the first view as a mini-map in the upper corner of the canvas and the second as the main view, as this is what we are investigating, but you may do as you wish. A nice option may be to allow the user to switch display locations.

Documentation

Please use relative references to your code in the html file. Included files from other sources (models, MV.js, ...) should be linked to an on-line source. This will allow me to extract the file in my local environment. Please provide a cover page that describes the operation of your program and lists collaborators, including any generative AI you have employed.

Additional Requirements/Comments

Extras

I find that I want to continue to play with simulations/visualizations of this type. Please do so, but only if you have sufficient time, do not enhance this, or any other project at the expense of your other classes.

Submission

When you have finished your assignment, please submit a tar or zip file containing all files needed for this project. Please do not post your project on line until after grades have been assigned.

Submit your file to the D2L homework folder Homework 5 by the due date.