Homework 2: WebGL Osgood Curve
Short Description:
Write a program that generates and displays an Osgood curve using WegGL.
This assignment is worth 20 points.
Goals
When you finish this homework, you should
- Written a simple program to display an object in WebGL.
Formal Description
Rewrite the program from Homework 1 to use WebGL for display. Please note the changes in the interface.
You should provide an interface which allows control of the following aspects:
- Gap Size: This is the percentage of the line removed each iteration. A gap size of .1 would remove 10% of the line.
- Background Color: Select the background color used. This may be from a preset list of background colors.
- Fill Color Method: Select the method used to color the figure.
- Starting Configuration: a selection of starting shapes. See the discussion below.
- Step: A button that calculates and displays the next iteration of the curve.
- Redraw: A button that redraws the current shape.
- Reset: A button that returns to the starting instance of the current shape. Colors are not reset.
Fill Color Method will be one of the following:
- Several different solid colors.
- A random coloring scheme. Each point is colored randomly.
- A coloring scheme based on the position of the point in the array. The earliest points (index position 1, 2, 3 should be red. The last should be blue. The color should move through red, yellow, green, cyan and blue. You are permitted to use code you find to accomplish the color transition, but you MUST document the source.
Good design practice says that you should provide default values to your interface from the model. This is somewhat difficult so you may hard code your interface to match your default values.
You must provide a number of different starting configurations. This includes an equilateral triangle.
Documentation
Your interface should built in a html file. This file should contain documentation discussing the project, including information such as
- Problems encountered
- Interesting techniques employed
- Sources of information
- Collaborators
- Notes on additions
- Screen shots of interesting results.
Please use relative references to your code in the html file. This will allow me to extract the file in my local environment.
Additional Requirements/Comments
- You may use the Common utilities discussed in class. However
- I expect you to build your code based on my examples.
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 file containing all files needed for this project. Please do not post your project on line until after grades have been assigned.
Submit your tar file as an attachment to a message to danbennett360@gmail.com. Please include your name, and the fact that this is homework 1 in the title of the message.