You are introduced to various pointing devices, such as the mouse, trackball, touchpad, pointing stick, joystick, touchscreen, and pen input. Scanners and reading devices, including optical scanners, optical readers, magnetic ink character recognition readers, and data collection devices are explained,...
Trang 1Computer Graphics
Lecture 24
Fasih ur Rehman
Trang 2Last Class
Polygon Clipping Algorithms
Trang 3Today’s Agenda
* Shading
Trang 4Light, Surface and Imaging
* [llumination has strong impact on
appearance of the surface
Trang 5* Shading
Surfaces
Trang 6Specular Surfaces
- Specular surfaces appear shiny because most of the light that is reflected or
scattered Is in a narrow range of angles close to the angle of reflection
- Mirrors are perfectly specular surfaces
Trang 7Diffusive Surfaces
- Diffuse surfaces are characterized by
reflected light being scattered tn all
directions Walls painted with matte or flat paint are diffuse reflectors
- Perfectly diffuse surfaces scatter light
equally in all
— Flat perfectly SK
same to all vi
irs the
Trang 8
Translucent Surfaces
- Translucent surfaces allow some light to penetrate the surface and to emerge from another location on the object
- This process of refraction characterizes glass and water
¬ Some InciId > reflected at the surface
Trang 9Shadows
:- Shadows created by finite-sIze light SOUFCG
- Umbra — full shadow
Wy
- Penumbra- —' -
Trang 10Light Sources
Amblent Light (uniform lighting)
PoInt Source (emits light equally ¡n all
directions)
* Spot Lights (Restrict light from ideal point source)
Trang 11What Shading can do?
- Let uS Suppose we draw a circle
Trang 12- and uses four vectors
Phong Reflection Model
- Asimple model supports three models of light — matter interactions
— Diffuse
— Specular
—- Ambient
— normal
— to source
— to viewer
Trang 13Summary
* Shading
Trang 14References
‘ Fundamentals of Computer Graphics Third Edition by Peter Shirley and Steve
Marschner
* Interactive Computer Graphics, A Top-
down Approach with OpenGL (Sixth
Edition) by Edward Angel