Johanna Okerlund
CS 307 Final project
Submitted:
May 14, 2012
Description:
I used Bezier curves, material and lighting, and texture mapping to create this scene.
With animation it looks like this:
The fire is made of a number of translated, rotated, and scaled individual flames, each made up
of 4 quarters, with each quarter being 4 quarter circles parallel with the xz plane, but at
different heights and locations. The highest of these is at the top of the flame and is not a
quarter circle, but rather comes together at a point. Using Bezier curves, the control points
of each of the quarter circles come together to form a smooth curve. This is repeated for the
four quadrants of each flame. The fire is animated by scaling each flame by a random number
between .75 and 1.25 each time the picture redisplays.
Above is what the scene looks like without texture mapping. The inside of the fireplace is
light yellow and the outer walls are dark yellow to give the varying intensities of yellow.
The lights for the candles are drawn first, but are disabled when the lower surface of the
mantle is drawn, which is when the light shining on the bottom of the mantle is enabled.
There are three spotlights in the inner chamber, one shining on each of the three inside walls.
After these three lights are drawn, the walls of the inner chamber are drawn as well as the fire.
The order the lights and walls are drawn in is important because not all lights shine on everything.
To texture map onto a surface with a specular highlight, I had to write a method to map the
texture a small square at a time so the light would be calculated many times across the quad.
I also had to account for the repetition of the texture being used on one quad.
The candle holders are made from Bezier curves rotated around an axis. The flame is animated
with the same technique as the fire.