Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Basic Image Manipulation

Working with color information

In the following image, I set the red and green channels to 0 to make the image blue.

Alpha blending

My blending function takes in a background and a foreground image. The foreground image has to be taken in blue screen. The blend function then creates a mask from the bluescreen image and blend the two image together.


I write a function that can scale an image down to a specified ratio. I do the scaling by down-sampling the image.


I wrote functions to visualize Julia and Mandelbrot sets. By changing the view window and the color rules, I get many interesting images.
(Click on image to see full size)

Scanline fill demonstration

I created an image to demonstrate the scanline fill algorithm. It is not particularly good since I let the scanline run a bit fast. But it gives a decent visual perspective of how scanline fill works.

Transparency Fill

I updated my scanline fill to take in a transparency parameter. In fact, transparency is created by doing alpha blending. In the following example, the axes are transparent.

(Image drawn by Dan Nelson)

Transformation and Viewing

A 2D image with the view panning and zooming:

A 3D image with the view rotating:

A 3D model with some rotating and panning (the model reads hd - hieu & dan)

Pseduo-3D coloring and shading.
We color the sides of the cube with different brightness. The brightness changes according to the angle where the view is at. The light source is from the left. As the cube rotates (in fact the view rotates), the left side is getting brighter and the right side is getting darker.

  • No labels