GoalsIn this assignment, you will use barycentric coordinates to smoothly blend RGB colors within a triangle. You will also learn to write your image to a file in ppm (portable pix-map format).
| |||||||
RGB Triangle Assignment Write a program that generates a picture of a triangle in arbitrary position, such that the color at each pixel within the triangle is the blend of the colors of the vertices of the triangle as determined by the barycentric coordinates of the pixel. The color must be generated one pixel at a time and written to a ppm file. Here are some triangles that were generated by such a program.
See /course/csg140/codeSamples for code samples.
What to submit
How to submit
Grading
Some points may be subtracted (up to 10%) if you need substantial help from the TA or professor to make your program run.
The penalty for a late homework is 5% per calendar day for up to one week late.
Harriet Fell College of Computer Science, Northeastern University 360 Huntington Avenue #340WVH, Boston, MA 02115 email: fell@ccs.neu.edu Phone: (617) 373-2198 / Fax: (617) 373-5121
Last Updated:
|