CS 184: COMPUTER GRAPHICS
Lecture #27 -- Mo: 5/3, 1999.
PREVIOUS
< - - - - > CS
184 HOME < - - - - > CURRENT
< - - - - > NEXT
Preparation:
Read: Ch. 13.2 -13.2.1 "Chromatic Color", Ch. 13.3-13.3.1 "RGB Color Model",
Ch 13.3.4-5 "HSV and HLS Color Models"
Skim: Ch. 11.2.3 "Uniform B-Splines"
B-Spline Curves
An easy way to make a smooth C2-continuous space curve for a path of an
airplane or for a camera path is to sprinkle a few control points through
space that define the coarse topology and geometry of the curve and then
let them be approximated by a
cubic B-spline. Assuming for the moment a closed curve with N=6 control
points, such a curve would be described as a sequence
of N=6 cubic curve segments, each one of which is controlled by four
consecutive control points, but producing a curve segment that is only
about as long as the distance between the two middle control points. Because
a subsequent curve segment reuses three of the control points of the previous
segment, they blend together in a very smooth (C2-continuous) way. The
interpolation function is given on page 493 of the text book.
In a nutshell, one segment depending on the 4 control points A,B,C,D,
is given by the polynomial:
Q = A(1 -3t +3t^2 -t^3)/6 + B(4 -6t^2 +3t^3)/6 + C(1
+3t +3t^2 -3t^3)/6 + D(t^3)/6
thus the point at t=0 is given by A/6 + 4B/6 + C/6,
and the point at t=1 is given by B/6 + 4C/6 + D/6.
Color
There are many useful color spaces based on physics, the human eye, the
needs of computer graphics, the way artists' paints mix ...
1D space:
Artists color wheel: 6 colors: -Red-Orange-Yellow-Green-Blue-Purple-
What is red and green together ? ==> (dirty brown).
2D spaces: (more formal):
Cyan, Yellow, Magenta. => Subtractive mixing (filters, printers).
Computer Scientist’s wheel: 2D: Red, Green, Blue. ==> Additive mixing
(lights, CRT).
We are missing some colors: where is brown, olive, pink, dark blue
... ?
3D space:
Color space is 3-dimensional to accommodate brightness/saturation variations:
HW view: RGB cube, store 3 intensity values for display on CRT.
Extension of the additive color wheel to a cone (6-sided pyramid) ==>
HSV.
Alternative: HLS: Double hex-cone. White/black at tips, saturated colors
on rim, at height 0.5.
Physical Colors
Physicist’s View: continuous spectrum, infinite dimensions.
Typical spectrum has some broad bumps plus some sharp spectral lines.
Perceptual Colors
The human visual system has three types of cones. (Can only take 3 integrated
samples).
Sensitivity of these cones differs: green most sensitive, blue the
least.
METAMERS: colors that look the same (P), but have different spectrum(L1,
L2).
Comparative measurements are done with a color-matching set-up:
3 superposed lights (A,B,C) are compared with test color (T).
You can match almost all, but not all, colors as far as human perception
goes.
The remainder can be matched when one of the 3 colors is placed on
the test light
--> subtractive effect. --> Color matching functions with pos
and neg coefficients.
==> Perceptual space is 3-dimensional. (1st Grassmann Law )
Grassman’s Laws:
(He measured RGB coordinates of all perceptual colors in 5nm steps, 1931)
1. Perceptual space is 3-dimensional.
(see above)
2. Metamer mix (add) to yield metamers:
L1, L1’ -> P1; L2, L2’ -> P2; then for any a, b :
a*L1 + b*L2 -> P3; then a*L1’ + b*L2’-> P3.
(not true for paints or pigments with non-additive behavior; see example
with filter below).
3. As physical color is varied continuously, perceptual color also
varies continuously.
(continuity of the perceptual process).
CIE diagram.
Formal perceptual color space, defined in 1931 by Commission International
de l’Eclairage.
Define a set of basis vectors that lie completely outside the range
of visible RGB values,
so that all of the component become positive and
so that all perceptual colors map into a single octant of a rectilinear
space.
(This is a linear transformation).
Then cut this cone with the plane x+y+z=1 and project this cut onto
the x,y plane:
==> CIE chromaticity diagram.
What can you display from this range ? (only linear combinations of
base colors)
==> typically a triangle ! --> Therefore, choose points as far apart
as possible.
Every output device is rather limited in the range of colors it can
display !
Phong
Illumination
Additive
Mixing
Subtractive
Mixing
Color
Mixing/Filtering Combination
Current Homework Assignment:
ASG#10
"Your Final Project"
DUE: Wednesday 5/12/99, 11:59pm.
CAN BE DONE WITH YOUR PARTNER OF CHOICE !
--> Next
Lecture
<-- Up to CS
184 HomePage
Page Editor: Carlo H. Séquin