This page was last updated: March 19, 2009
| Parameter | What It Does |
|---|---|
| Ad | Ellipse radius #1 |
| Bd | Ellipse radius #2 |
| NoiseAmp | Noise Amplitude |
| NoiseFreq | Noise Frequency |
| Tol | Width of the blend between ellipse and non-ellipse areas |
| NoiseAmp | NoiseFreq |
| Tol |
Add an Alpha parameter that changes the opacity of the non-ellipse areas. When Alpha == 0., do a discard( ) instead of setting alpha.
| Parameter | What It Does |
|---|---|
| Alpha | Opacity of non-ellipse areas |
| Alpha |
Add a ChromaDepth feature that colors the scene in color gradations: Red in the front, Blue in the back, and Green in the middle. At the least, include a new slider called Blend which turns ChromaDepth on and off. Also feel free to add sliders to control at which depths Red and Blue appear.
| Parameter | What It Does |
|---|---|
| Blend | Blend between no-ChromaDepth and using ChromaDepth. |
| ChromaDepth |
If you normalize a distance t so that it is t=0. in the front of the object and t=1. in the back, here is code to assign the colors. (It is actually just the hue-only part of the rainbow color scale.)
vec3
ChromaDepth( float t )
{
t = clamp( t, 0., 1. );
t *= (2./3.);
float r = 1.;
float g = 0.0;
float b = 1. - 6. * ( t - (5./6.) );
if( t <= (5./6.) )
{
r = 6. * ( t - (4./6.) );
g = 0.;
b = 1.;
}
if( t <= (4./6.) )
{
r = 0.;
g = 1. - 6. * ( t - (3./6.) );
b = 1.;
}
if( t <= (3./6.) )
{
r = 0.;
g = 1.;
b = 6. * ( t - (2./6.) );
}
if( t <= (2./6.) )
{
r = 1. - 6. * ( t - (1./6.) );
g = 1.;
b = 0.;
}
if( t <= (1./6.) )
{
r = 1.;
g = 6. * t;
}
return vec3( r, g, b );
}
Note that this code implements the full (H,S=1.,V=1.) to (R,G,B) conversion. You need to keep t between 0. and (2./3.) because you are only interested in the Red-Green-Blue color range. This code is good to keep around. There are lots of good visualization uses for it too.
It would be a big help to me if you would use the GLIB MessageBox command to let me know if you have implemented one or more Extra Credits. For example:
Electronic submissions are due at 23:59:59 on April 30.
The paper turnin is due the class period following the electronic copy due date, May 1.
| Feature | Points |
|---|---|
| Correct changes in Ad and Bd | 20 |
| Correct changes in NoiseAmp | 30 |
| Correct changes in NoiseFreq | 30 |
| Correct changes in Tol | 20 |
| EC #1: Correct changes in Alpha | 5 |
| EC #2: Correct ChromaDepth | 5 |
| Potential Total | 110 |