teaching machines

FISHERJK – Gaussian Pox

February 13, 2015 by . Filed under cs455, postmortems, spring 2015.

bump1 bump2

Thought Process:

My thought process with this assignment was to first start figuring out how the indexing of the RGB channels worked and what a Gaussian Bump meant in this context. I then needed to figure out how to structure this in relation to the PPM file format. After writing the  Image class components and trying to grapple with the main method, I decided that to best represent a Gaussian Bump as its own object with bells and whistles to call its own. From here I was able to abstract away some of the overhead and I could write the remaining functionality to generate bumps, calculate energies, and so on. Once I was content, all I needed to do was clean up the code, define some helper methods, and make pretty colors by normalizing based on rows and columns.

Challenges:

One tricky part of this assignment came with managing the loops and indexing used to keep track of a particular pixel’s energy. Treating a 1-D array as a 2-D array and mapping energies and colors was a little difficult to wrap my head around, but it was the best design choice.   Another component that gave me some grief was the console interaction I added towards the end. At the time I was unaware that I was reusing some leftover macros which caused inconsistent memory access and/or PPM files with missing chunks from a Gaussian bump.