24.colorissues - clarkson university › class › cs452 › slides › 24.colorissues.pdfuse...
TRANSCRIPT
![Page 1: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/1.jpg)
CS452/552; EE465/505
Color Display Issues
4-16–15
![Page 2: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/2.jpg)
2
![Page 3: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/3.jpg)
! Color Display Issues ✦Color Systems ✦Dithering and Halftoning
! Splines ✦Hermite Splines ✦Bezier Splines ✦Catmull-Rom Splines
Read: Angel, ✦Chapter 8, section 8.13 Display Considerations ✦Chapter 11, Curves and Surfaces ✦Chapter 12, section 12.1 - 12.7 Advanced Rendering: Ray-Tracing
Lab#5 posted, due: April 22nd simple scene: platform & object; 1 light; shadow map; camera controls Project#2 posted due: April 23rd
Outline
![Page 4: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/4.jpg)
Light mapping
![Page 5: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/5.jpg)
// starting point p, direction d, max # of steps; returns a color c (single light source) trace(p, d, step) { color local, reflected, transmitted; point q; normal n; if(step > max) return(background_color); q = intersect(p, d, status); if(status==light_source) return(light_source_color); if(status==no_intersection) return(background_color); n = normal(q); r = reflect(q, n); t = transmit(q,n); local = phong(q, n, r); reflected = trace(q, r, step+1); // recursive call transmitted = trace(q, t, step+1); // recursive call return(local + reflected + transmitted); }
Recursive Ray Tracer (Simple version)
![Page 6: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/6.jpg)
! Efficiency ✦ replace the recursion with iteration ✦use bounding boxes to simplify the math used to compute intersections
! Aliasing errors, due to sampling ✦use a stochastic sampling method in which the decision on where to cast the next ray is based on the rays cast so far (used in Renderman)
! Ray tracing is an inherently parallel process ! There are many free ray tracers available
Ray Tracing: Summary
![Page 7: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/7.jpg)
Next Topic: Displays & Color! Consider perceptual issues related to displays ! Introduce chromaticity space
✦Color systems ✦Color transformations
! Standard Color Systems
Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley 2015
![Page 8: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/8.jpg)
! Problems that affect the quality of a display ✦two different displays may have the same resolution, but display pixels at different sizes
✦the colors displayed on two different monitors may differ ● map software-defined colors onto the display ● map brightness values onto the display
✦RGB values are independent of display properties, but do not account for the full range of the human visual system
! The range of displayable colors for a device is called its color gamut
Displays & Color
![Page 9: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/9.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Luminance and Color Images! Luminance Image
✦Monochromatic ✦ Values are gray levels ✦ Analogous to working with black and white film or television
! Color Image ✦ Has perceptional attributes of hue, saturation, and lightness ✦ Do we have to match every frequency in visible spectrum? No!
![Page 10: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/10.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Perception Review! Light is the part of the electromagnetic spectrum
between ~350-750 nm ! A color C(λ) is a distribution of energies within this
range! Human visual system has two types of
sensors ✦Rods: monochromatic, night vision ✦Cones: color sensitive ● Three types of cones
! Consequently, only three values, the tristimulus values, are “perceived” by the brain
![Page 11: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/11.jpg)
Color vision deficiency! red-green
✦ difficulty distinguishing between shades of red + green
✦ affects ~8% of males and ~0.5% of females in populations of North European ancestry
! achromatopsia ✦ cannot perceive any
colors ✦ rare, < 1/30,000 for
most populations
! blue-yellow
✦ difficulty differentiating shades of blue and yellow
✦ affects males & females equally, < 1/10,000
![Page 12: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/12.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Tristimulus Values! The human visual center has three cones with
sensitivity curves S1(λ), S2(λ), and S3(λ) ! For a color C(λ), the cones output the tristimulus
values
λλλ dCST )()(11 ∫=
λλλ dCST )()(22 ∫=
λλλ dCST )()(33 ∫=
C(λ)
T1, T2, T3cones
optic nerve
![Page 13: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/13.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Three Color Theory! Any two colors with the same tristimulus values are
perceived to be identical ! Thus a display (CRT, LCD, film) must only produce
the correct tristimulus values to match a color ! Is this possible? Not always
✦Different primaries (different sensitivity curves) in different systems
![Page 14: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/14.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
The Problem! The sensitivity curves of the human are not the same as those of physical devices
! Human: curves centered in blue, green, and green-yellow
! CRT: RGB ! Print media: CMY or CMYK ! Which colors can we match and, if we cannot match, how close can we come?
![Page 15: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/15.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Representing Colors! Consider a color C(λ) ! It generates tristimulus values T1, T2, T3
✦Write C = (T1, T2, T3 ) ✦Conventionally,we assume 1≥ T1, T2, T3 ≥ 0 because there is a maximum brightness we can produce and energy is nonnegative
✦C is a point in color solid C1
11T1
T2
T3
![Page 16: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/16.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Producing Colors! Consider a device such as a CRT with RGB
primaries and sensitivity curves
! Tristimulus valuesλλλ dCRT )()(1 ∫= λλλ dCGT )()(2 ∫= λλλ dCBT )()(3 ∫=
![Page 17: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/17.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Matching ! This T1, T2, T3 is dependent on the particular device
! If we use another device, we will get different values and these values will not match those of the human cone curves
! Need a way of matching and a way of normalizing
![Page 18: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/18.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Color Systems! Various color systems are used
✦Based on real primaries: ● RGB ● UVW ● CMYK ● HLS (aka HSB) ● NTSC YIQ (National Television System Committee)
✦Theoretical ● XYZ
! Prefer to separate brightness (luminance) from color (chromatic) information ✦Reduce to two dimensions
![Page 19: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/19.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Tristimulus Coordinates
TTTTt
321
11 ++=
TTTTt
321
22 ++=
! For any set of primaries, define
TTTTt
321
33 ++=
1ttt 321 =++ 0,,1 ttt 321 ≥≥✦Note:
![Page 20: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/20.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Maxwell Triangle
Project onto 2D: chromaticity space
1
1T1 + T2+T3 =1
1
color solid
t1
t2
1
1t1 +
t2 =1possible colors
![Page 21: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/21.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
NTSC RGB
1
1
r
g
r+g+b=1
r+g=1
![Page 22: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/22.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Producing Other Colors! However colors producible on one system (its color gamut) is not necessarily producible on any other
! Note that if we produce all the pure spectral colors in the 350-750 nm range, we can produce all others by adding spectral colors
! With real systems (CRT, film), we cannot produce the pure spectral colors
! We can project the color solid of each system into chromaticity space (of some system) to see how close we can get
![Page 23: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/23.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Color Gamuts
spectral colors printer colors
CRT colors
350 nm
750 nm
600 nm
producible color on CRT but not on printer
producible color on both CRT and printer
unproducible color
![Page 24: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/24.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
XYZ! Reference system in which all visible pure spectral colors can be produced
! Theoretical systems, as there are no corresponding physical primaries
! Standard reference system
![Page 25: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/25.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Color Systems! Most correspond to real primaries
✦National Television Systems Committee (NTSC) RGB matches phosphors in CRTs
! Film both additive (RGB) and subtractive (CMY) for positive and negative film
! Print industry CMYK (K = black) ✦K used to produce sharp crisp blacks ✦Example: ink jet printers
![Page 26: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/26.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Color Transformations! Each additive color system is a linear transformation of another
R
R’
GG’
BB’
C = (T1, T2, T3) = (T’1, T’2, T’3)
in RGB system
in R’G’B’system
![Page 27: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/27.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Additive and Subtractive Color! Additive color
✦Form a color by adding amounts of three primaries ● CRTs, projection systems, positive film
✦Primaries are Red (R), Green (G), Blue (B) ! Subtractive color
✦Form a color by filtering white light with cyan (C), Magenta (M), and Yellow (Y) filters ● Light-material interactions ● Printing ● Negative film
![Page 28: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/28.jpg)
! Primary colors: ✦ red, green, blue
! Secondary colors: ✦yellow = red+green ✦cyan = green+blue ✦magenta = blue+red
! All colors ✦white = red+green+blue ✦black = no color
RGB: Red, Green, Blue
C = T1R + T2G + T3B
Color Cube
![Page 29: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/29.jpg)
CMYK: Cyan, Magenta, Yellow, Black! Primary colors:
✦cyan, magenta, yellow ! Secondary colors:
✦blue = cyan+magenta ✦ red = magenta+yellow ✦green = yellow+cyan
! All colors ✦white = no color ✦ black = cyan+magenta+yellow ● for true black, add in black
Also known as process color (used to print full-color images)
(+black)
![Page 30: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/30.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
RGB, CMY, CMYK! Assuming 1 is max of a primary C = 1 – R M = 1 – G Y = 1 – B ! Convert CMY to CMYK by K = min(C, M, Y) C’ = C – K M’ = M – K Y’ = Y - K
![Page 31: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/31.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Color Matrix! Exists a 3 x 3 matrix to convert from representation in
one system to representation in another
! Example: XYZ to NTSC RGB ✦ find in colorimetry references
! Can take a color in XYZ and find out if it is producible by transforming and then checking if resulting tristimulus values lie in (0,1)
!!!
"
#
$$$
%
&
=!!!
"
#
$$$
%
&
TTT
T'T'T'
3
2
1
3
2
1
M
![Page 32: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/32.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
YIQ! NTSC Transmission Colors ! Here Y is the luminance
✦ arose from the need to separate brightness from chromatic information in TV broadcasting
! Note luminance shows high green sensitivity
!!!
"
#
$$$
%
&
!!!
"
#
$$$
%
&
=
!!!
"
#
$$$
%
&
BGR
0.3110.523-0.2120.321-0.275-0.5960.1140.5870.299
QIY
![Page 33: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/33.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Other Color Systems! UVW: equal numerical errors are closer to equal
perceptual errors ! HLS: perceptual color (hue, saturation, lightness)
✦Polar representation of color space ✦Single and double cone versions
![Page 34: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/34.jpg)
HSB: Hue, Saturation, Brightness! Hue is the actual color. It is
measured in angular degrees counter-clockwise around the cone starting and ending at red=0 or 360 (yellow = 60, green = 120, etc.).
! Saturation is the purity of the color, measured in percent from the center of the cone (0) to the surface (100).
! Brightness is measured in percent from black (0%) to white (100%).
✦ grayscale – axis from 0% (white) to 100% (black)
![Page 35: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/35.jpg)
E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012
Gamma Correction ! Intensity vs CRT voltage is nonlinear
I = cVγ! Gamma correction (encoding) can code/decode
luminance or tristimulus values ! Can use a lookup table to correct ! Human brightness response is logarithmic
✦Equal steps in gray levels are not perceived equally ✦Can use lookup table
! CRTs cannot produce a full black ✦Limits contrast ratio
![Page 36: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/36.jpg)
Dithering (digital halftoning)
![Page 37: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/37.jpg)
Black/White Dithering
![Page 38: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/38.jpg)
Color Dithering
![Page 39: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/39.jpg)
Halftoning
![Page 40: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/40.jpg)
Modeling Complex Shapes
![Page 41: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/41.jpg)
! Local control of shape ■ so that it is easy to build and modify
! Stability ! Smoothness and continuity ! Ability to evaluate derivatives ! Ease of rendering
What do we need from curves in Computer Graphics?
![Page 42: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/42.jpg)
Utah Teapot
! Most famous data set in computer graphics ! Widely available as a list of 306 3D vertices and the indices that define 32 Bezier patches
![Page 43: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/43.jpg)
Curve Representations
![Page 44: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/44.jpg)
Parameterization of a Curve
![Page 45: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/45.jpg)
Polynomial Interpolation
![Page 46: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/46.jpg)
Splines: Piecewise Polynomials
![Page 47: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/47.jpg)
Piecewise Polynomials
![Page 48: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/48.jpg)
Splines
![Page 49: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/49.jpg)
Cubic Curves in 3D
![Page 50: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/50.jpg)
Cubic Hermite Splines
![Page 51: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/51.jpg)
Deriving Hermite Splines
![Page 52: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/52.jpg)
Deriving Hermite Splines
![Page 53: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/53.jpg)
Deriving Hermite Splines
![Page 54: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/54.jpg)
The Cubic Hermite Spline Equation
![Page 55: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/55.jpg)
Four Basis Functions for Hermite Splines
![Page 56: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/56.jpg)
Piecing together Hermite Splines
![Page 57: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/57.jpg)
Hermite Splines in Adobe Illustrator
![Page 58: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/58.jpg)
Bezier’s Idea! In graphics and CAD, we do not usually have derivative data
! Bezier suggested using the same 4 data points as with the cubic interpolating curve to approximate the derivatives in the Hermite form
![Page 59: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/59.jpg)
Bezier Splines
![Page 60: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/60.jpg)
Approximating Derivatives
p0
p1p2
p3
p1 located at u=1/3 p2 located at u=2/3
3/1pp)0('p 01−≈
3/1pp)1('p 23−≈
slope p’(0) slope p’(1)
u
![Page 61: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/61.jpg)
The Bezier Spline Matrix
![Page 62: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/62.jpg)
Bezier Blending Functions
![Page 63: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/63.jpg)
DeCasteljau Construction
![Page 64: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/64.jpg)
Bezier Patches
Using same data array P=[pij] as with interpolating form
vupvbubvup TBB
Tijj
i ji MPM==∑∑
= =
)()(),(3
0
3
0
Patch lies in convex hull
![Page 65: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/65.jpg)
Analysis! Although the Bezier form is much better than the interpolating form, we have the derivatives are not continuous at join points
! Can we do better? ■ Go to higher order Bezier ● More work ● Derivative continuity still only approximate ● Supported by OpenGL
■Apply different conditions ● Tricky without letting order increase
![Page 66: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/66.jpg)
Catmull-Rom Splines
![Page 67: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/67.jpg)
Constructing the Catmull-Rom Spline
![Page 68: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/68.jpg)
Catmull-Rom Spline Matrix
![Page 69: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/69.jpg)
Splines with More Continuity?
![Page 70: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/70.jpg)
Comparison of Basic Cubic Splines
![Page 71: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/71.jpg)
Natural Cubic Splines
![Page 72: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/72.jpg)
B-Splines
![Page 73: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/73.jpg)
B-Splines! Basis splines: use the data at p=[pi-2 pi-1 pi pi-1]T
to define curve only between pi-1 and pi
! Allows us to apply more continuity conditions to each segment
! For cubics, we can have continuity of function, first and second derivatives at join points
! Cost is 3 times as much work for curves ■ Add one new point each time rather than three
! For surfaces, we do 9 times as much work
![Page 74: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/74.jpg)
B-Spline Basis
![Page 75: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/75.jpg)
Other Common Types of Splines
![Page 76: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/76.jpg)
Generalizing Splines! We can extend to splines of any degree ! Data and conditions to not have to given at equally spaced values (the knots) ■ Nonuniform and uniform splines ■ Can have repeated knots ● Can force spline to interpolate points
! Cox-deBoor recursion gives method of evaluation
![Page 77: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/77.jpg)
NURBS! Nonuniform Rational B-Spline curves and surfaces add a fourth variable w to x,y,z ■ Can interpret as weight to give more importance to some control data
■ Can also interpret as moving to homogeneous coordinate
! Requires a perspective division ■ NURBS act correctly for perspective viewing
! Quadrics are a special case of NURBS
![Page 78: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/78.jpg)
How to Draw Spline Curves
![Page 79: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/79.jpg)
Drawing Splines, continued
![Page 80: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/80.jpg)
Summary
![Page 81: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/81.jpg)
! use Catmull-Rom splines along with lighting and texture mapping to create a roller coaster simulation
! runs in a first-person view, allowing the user to “ride” the coaster in an immersive environment
Project: Roller Coaster
![Page 82: 24.colorIssues - Clarkson University › class › cs452 › slides › 24.colorIssues.pdfuse bounding boxes to simplify the math used to compute intersections! Aliasing errors, due](https://reader033.vdocuments.us/reader033/viewer/2022060320/5f0d03947e708231d4383ff9/html5/thumbnails/82.jpg)
Animation