Amr A. Awadallah - My Computer Graphics Teapot
For my last assignment in CS248
(Introduction to Computer Graphics) I had to generate a couple of teapots
with different textures. That class was really fun and the teapots came
out to look very nice, so here they are:
1) Calligraphic art teapot:
This surface is simply brushed silver with an Arabic art
calligraphic carved on it. Teapots like this (and similar objects) are
actually very famous in Egypt and sold in a place called Khan-ElKhalily.
In case you visit Egypt then remember to buy one of these :)
To achieve this surface I used the following:
1- Bump mapping to map the normal according to
the calligraphic to be carved on the surface.
2- Turbulence to slightly perturb the normal hence
giving the illusion that the silver is brushed.
3- Reflection shading to give the illusion of the
silver being reflective.
These are the bump-map and the reflection-map:
2) Amr's Bumped Teapot:
This teapot has my name in arabic engraved
on it. To do this I used standard bump-map techniques to perturb the normal.
I used bi-linear interpolation to find the texture bump derivatives which
is very important, specially for points which are far in perspective.
The texture is wrapped around. Only the green component of the bump map
is used since it carries a good fraction of the luminance. I used forward
differences to get the texture partial derivatives even though central
differences may give better results. Also higher order finite differences
may be used to improve the derivative estimation.
This is the bump-map used:
3) Marble Teapot:
This marble teapot is generated using turbulence functions.
I use tricolor for the Marble. I compute two noise parameters based on
x,y,z then z,x,y. Then I do a double LERP on the three colors to get a
final color. I used the MarbleColor() function in page 1046 0f the (Foley-vanDam-Feiner-Hughes)
Computer Graphics book, which is sin( x + Turbulence(x, y, x) ). I modified
that function to support three colors. Hence my marble has two colors of
veins. One of them modulated in the x-direction and the other is modulated
in the z-direction.
4) Wood Teapot:
Also generated by turbulence functions. I oriented
the trunk of the tree in the y-axis. The age of the tree (number of cylinders)
can is controlled by changing the noise function parameters. I use fsin(noise)
to normalize the noise, after all sin(noise) = noise ! I set the diffuse
color and specular color to be the same. If the wood is covered with a
plastic layer then this effect can also be simulated by setting the specular
color to white.
5) Projected Texture Light Shader:
Here the teapot is illuminated by three point light
sources (red, green, blue) at different positions behind a shader-texture.
I simply added a transformation applied on the object to orient it in the
light co-ordinate system as if it is lying along the z-axis of the light,
then used standard projected texture light shader algorithms.
This is the shader-map used:
6) Algorithmic Light Shader:
Same as above but instead of using shader-map, and
algorithmic shader is used. I compute the Euler angles (directions) for
the current point on the surface to the light source. Then I use
modulated sinusoidal functions on these angles to decide whether light
should pass or not. Note that the light here either can pass or can not
pass which leads to the sharp edges of the patterns generated. For a more
complicate scene the light can be attenuated or modulated rather than pure
Page maintained by Amr A.
Awadallah (If you have comments or suggestions, email me at firstname.lastname@example.org)