Algorithms & Pictures
The first image below was created to represent a 3D scene. It features a number of differently-shaped polygons of a varying number of vertices that are all filled in with different colors using the shade fill algorithm. It also shows how we were able to combine the circle functions from Assignment 3 and include them in this assignment:
The second image utilizes polylines to convey a secret message. It is accented by a scanfilled exclamation point in the bottom righthand corner:
This assignment continued to reinforce the importance of always writing strong code that is applicable in any situation. If an algorithm only works in special cases, like polygons that are always contained with in the canvas boundaries, it's only valid in those specific cases. It took some extra work, but our code can be applied to any shape with any coordinates (as evidenced by the sun in our pastoral scene, which is anchored in the top righthand corner). It was a rewarding assignment because we were finally able to see our work start to come together in a more realistic way. Lines are great, but filled shapes of all sizes are better and much more widely applicable.