Test review part 2

# Test review part 2 - ◆ OpenGL will interpolate color...

This preview shows pages 1–5. Sign up to view the full content.

21 HSV Color Space (cont) value the sensation of light and dark colors white has a value of 1 and black has a value of 0 easier for a human to choose colors pick the color family (red, green, yellow, etc) pick the purity or strength of the color pick the lightness of the color

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
22 HSV Color Space (cont) hue is measured in degrees around the circle forms a hexcone in space
23 Color in OpenGL OpenGL only supports RGB and RGBA we’ll study RGBA a little later whenever an object is drawn, it is drawn with the current color set color, draw, set color, draw, etc specify colors using void glColor3f(float red, float green, float blue) sets the current color to (red, green, blue) where the values of red, green, and blue are clamped to between 0.0f and 1.0f

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
24 Color in OpenGL (cont) can set the color per vertex
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ◆ OpenGL will interpolate color between vertices glBegin( GL_QUADS ); glColor3f( 1.0f, 0.0f, 0.0f ); // red glVertex2f( 0.0f, 1.0f ); glVertex2f( 0.0f, 0.0f ); glColor3f( 0.0f, 0.0f, 1.0f ); // blue glVertex2f( 1.0f, 0.0f ); glVertex2f( 1.0f, 1.0f ); glEnd(); red blue 25 Interaction of Light With Matter ■ interaction of light with matter is generally not well understood ■ a simplified approach is the bidirectional reflection distribution function (BRDF) ◆ an even simpler approach is taken by traditional computer graphics (we’ll study this shortly) ■ BRDF assumes that light striking a point on the surface leaves the surface from the same point ◆ idea: for every direction incident on a point, measure the amount of light leaving the point in every direction...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

Test review part 2 - ◆ OpenGL will interpolate color...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online