Due Date: Tuesday, Feb 6.
Random Numbers: Download and run the POV-Ray files on the topics page that illustrate the use of random numbers (random.pov and chars.pov). Experiment varying colors, locations, sizes, etc using the random number generator to see what you get.
The random number generator always returns a number between 0 and 1, so you may have to do some do some math if you need to change the range. For example, 10*rand(R)-5 gives a number between -5 and 5. DO you see why?
Save an image that you like to put on your web page (thumbnail linked to large image).
Trigonometry: Trig functions are very useful when you need to create waves or circles. Review the examples that were done in class (can you create then yourself?). Vary what was done. Remember, you can use trig functions to set the color as well as position. Your goal is to develop a good intuition about what sines and cosines represent.
Save an image that you like to put on your web page (thumbnail linked to large image).
Matrices: In class, we saw how matrices are used to represent transformations. Review your class notes to be sure that you understand how matrix calculations are done:
Below is an example of using a matrix in POV-Ray to perform a translation and shear:
click here for povray code.
Download and runthis file. Experiment changing the matrix to a scale or a rotation - does the program do what you expect? Experiment changing any of the values in the matrix. You shouldbe able to predict ahead of time, what will happen to the image.
Create your own object to replace the table. Apply matrix transformations to generate an interesting and fun image that illustrate your understanding of the process. Place the image (thumbnail linked to large image) on your web page. Email as attachments, a copy of your povray file along with the large image to gorr. Please remember to put
in the subject line so that your email can easily be found in your instructor's overly full email box.
No later than class time on Tuesday, Feb 6, please do the following:
Place on your webpage
Email an image and your povray code using matrices to gorr with "CS-142 Lab 3" in the subject line.
We will discuss the images during class on Feb 6.