teaching machines

spiegedj – HW 1

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

Hurdles: 

One issue I had was that I was getting weird distortions around the edges of my bumps. This turned to be because I was printing the float value of the colors to my PPM file and gimp interprets 3.03984e-005 as 3. Additionally, testing the code to make sure it was correct was a challenge.

Thought Processes: 

I started off by creating the Image class uses the specs. Next I wrote three loops to generate bumps, calculate energies, and then map these energies to colors. For my mapping I wanted to create a wave like pattern. To (sort of) do this I used the absolute value of a sine function of period 1 and then passed that to a linear interpolation function so I could change colors from blue to cyan. Since I didn’t normalize by using the max value I could have gotten away with 2 loops, but I kept it at three for cleanliness.

Here is the result with one bump:

Image1

Then with 250 bumps:

image2