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.
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.
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.
The scene consists of 3 formations of wind power generators. Each formation is made up of 3 generators. To create the distance effect, I scale each formation differently and place them appropriately on the screen so that it looks like there are 3 rows of generators from near to far.
I created an image showing that Z-Buffer is working. The image contains of 3 boxes in line with each other, but they are 0.5 units away from each other on the z axis. I rotate them to change the angle of view to show that some times the two boxes behind can be seen.
I made this picture by stacking cubes in appropriate positions. I have 1 LightPoint and 1 ambient light in my scene. To demonstrate Gouraud Shading I make my model rotate.
The picture below is actually a mistake, but I think it looks cool. It looks like gears to me.