Wednesday, May 11, 2011

Scheme: Image Altering

My code : image-altering.ss
IU scheme library : c211-lib.s
 
Occasionally I will decide I want to write image altering scheme methods.

(vortex 150 5 (read-image "grid.gif"))
Vortex is probably my favorite. Each pixel references a pixel a certain offset away on a radial line, the offset being governed by a quadratic equation that smoothly goes to zero at the edges.

(wave-sin 40 (read-image "image.jpg))

Wave-sin fades in and out red, green, and blue based on a sin wave of the specified wavelength in pixels. I made this in 3 hours while I was waiting for a class.

I also did stuff for c211 including seam carving, image smoothing, and creating images whole cloth like this one I made to visualize power projection on a hexagonal grid when I was fleshing out plans for a Civ5 AI.

No comments:

Post a Comment