Tuesday, February 19, 2013

The One with the Bag of Pixels

Hello all,

Instead of modifying just particular pixels, now we have learned to modify all of the pixels in an image by changing the values of the colors associated with each pixel.

I decided to take a rather bright water color painting I made of my grandma and tone it down to a nice cool color. I did this by taking the average of all three color values (red, green, and blue) and set the original "blue" value to this new average. After that, I divided the value of red by a factor of 1.2 and multiplied the green values by a factor of 0.8.

Here is the before and after:




















And to show this modification with another picture, here is a passion flower example:

See you in class!

Thursday, February 14, 2013

The One With Starchild

Hello!

So we're finally working with pictures (hooray!!) and I went through about 1000 lines of code to change a bunch of pixels to black, (0,0,0). I took an old Polaroid of me as a child and turned me into
... dun dun dun...
Starchild! Woot.
Here are the before and after pictures:


Hope you enjoyed!

Saturday, February 2, 2013

The One with the Arguments

Hey everyone,

So we're learning more about simple functions. The thing that I had the hardest wrapping my head around was that nothing really major needed to be changed to create a function with multiple arguments, they just had to be separated by commas. I expected the process to be a bit more difficult, and I'm still trying to figure out how much more I can do with more than one argument. So far (obviously) I know I can compute areas, perimeters, and other related calculations of simple geometric shapes.

See you all in class Tuesday!