CS 430/536 Computer Graphics I. 3D Clipping Week 7, Lecture 14

Similar documents
Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Overview. Raster Graphics and Color. Overview. Display Hardware. Liquid Crystal Display (LCD) Cathode Ray Tube (CRT)

CBIR: Colour Representation. COMPSCI.708.S1.C A/P Georgy Gimel farb

CS 325 Computer Graphics

Color Management Terms

Computer Vision. Color image processing. 25 August 2014

Digital Image Basics. Introduction. Pixels and Bitmaps. Written by Jonathan Sachs Copyright Digital Light & Color

1. Introduction to image processing

Perception of Light and Color

1. Three-Color Light. Introduction to Three-Color Light. Chapter 1. Adding Color Pigments. Difference Between Pigments and Light. Adding Color Light

Name Class Date. spectrum. White is not a color, but is a combination of all colors. Black is not a color; it is the absence of all light.

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

THE NATURE OF LIGHT AND COLOR

Digital Color Workflows and the HP DreamColor LP2480zx Professional LCD Display

Light Waves and Matter

Calibration Best Practices

ColourSpace Conversions

Denis White Laboratory for Computer Graphics and Spatial Analysis Graduate School of Design Harvard University Cambridge, Massachusetts 02138

Computer Graphics. Coursework. Overview. Programming Assignments. Art Contest. Administrative Matters. Exams (30%) In class (Mar 11 and Apr 29)

Chapter 7 ADDITIVE COLOR MIXING

Color quality guide. Quality menu. Color quality guide. Page 1 of 6

Important Notes Color

VISUAL ARTS VOCABULARY

Simplify your palette

Three Key Paper Properties

Filters for Black & White Photography

Color Theory for Floral Design

Colour spaces - perceptual, historical and applicational background

Color Balancing Techniques

Experiment #5: Qualitative Absorption Spectroscopy

The role of working spaces in Adobe applications

The Information Processing model

CULTURAL HISTORY Primary Colors - Part 1 of 2 by Neal McLain

A Adobe RGB Color Space

CALIBRATION AND OPERATION OF PANASONIC PLASMA MONITORS JULY 2009

Chemistry 111 Lab: Intro to Spectrophotometry Page E-1

ELEMENTS OF ART & PRINCIPLES OF DESIGN

DESIGN ELEMENTS OF DESIGN

At the core of this relationship there are the three primary pigment colours RED, YELLOW and BLUE, which cannot be mixed from other colour elements.

Hello and Welcome to this presentation on LED Basics. In this presentation we will look at a few topics in semiconductor lighting such as light

How many PIXELS do you need? by ron gibbs

Philips HDR technology White paper

UNDERSTANDING DIFFERENT COLOUR SCHEMES MONOCHROMATIC COLOUR

THE BASICS OF COLOUR THEORY

Color Part I. (The two items we can determine: a. How bright is the light is. b. What color the light is.)

Imaging Systems Laboratory II. Laboratory 4: Basic Lens Design in OSLO April 2 & 4, 2002

Improved predictive modeling of white LEDs with accurate luminescence simulation and practical inputs

EXPERIMENT 11 UV/VIS Spectroscopy and Spectrophotometry: Spectrophotometric Analysis of Potassium Permanganate Solutions.

Graphic Design Basics. Shannon B. Neely. Pacific Northwest National Laboratory Graphics and Multimedia Design Group

NURBS Drawing Week 5, Lecture 10

A simpler version of this lesson is covered in the basic version of these teacher notes.

BASIC CONCEPTS OF HAIR PHYSIOLOGY AND COSMETIC HAIR DYES

Section 12.6: Directional Derivatives and the Gradient Vector

Implementing ISO12646 standards for soft proofing in a standardized printing workflow

NURBS Drawing Week 5, Lecture 10

A comparison between a CRT and a LCD monitors colors rendering

Art Education Color Theory on the Computer Patricia Johnson Computer Graphics Education Consultant

Austin Peay State University Department of Chemistry Chem The Use of the Spectrophotometer and Beer's Law

A Guide to. Understanding Graphic Arts Densitometry

Choosing Colors for Data Visualization Maureen Stone January 17, 2006

Color and Light. DELTA SCIENCE READER Overview Before Reading Guide the Reading After Reading

Pantone Matching System Color Chart PMS Colors Used For Printing

TIL311 HEXADECIMAL DISPLAY WITH LOGIC

Using Image J to Measure the Brightness of Stars (Written by Do H. Kim)

Technical Paper DISPLAY PROFILING SOLUTIONS

Jitter Measurements in Serial Data Signals

RGB coordinates of the Macbeth ColorChecker

ATOMIC SPECTRA. Apparatus: Optical spectrometer, spectral tubes, power supply, incandescent lamp, bottles of dyed water, elevating jack or block.

Review Vocabulary spectrum: a range of values or properties

Scanners and How to Use Them

Luckylight mm (2.4") 8 8 RGB color Dot Matrix LED Displays Technical Data Sheet. Model No.: KWM-50884XRGBB

APPLICATION NOTES: Dimming InGaN LED

MANAGING COLOR IN A GLOBAL PRINT WORKFLOW MANAGING COLOR IN A PRINT WORKFLOW

Spectrophotometry and the Beer-Lambert Law: An Important Analytical Technique in Chemistry

13 PRINTING MAPS. Legend (continued) Bengt Rystedt, Sweden

GIS Tutorial 1. Lecture 2 Map design

Color. & the CIELAB. System

Introduction to Light, Color, and Shadows

ICC Recommendations for Color Measurement

Expert Color Choices for Presenting Data

(a) We have x = 3 + 2t, y = 2 t, z = 6 so solving for t we get the symmetric equations. x 3 2. = 2 y, z = 6. t 2 2t + 1 = 0,

Waves Sound and Light

Lecture 16: A Camera s Image Processing Pipeline Part 1. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

1 Laboratory #5: Grating Spectrometer

Preview of Period 3: Electromagnetic Waves Radiant Energy II

A Short Introduction to Computer Graphics

Learning about light and optics in on-line general education classes using at-home experimentation.

Experiment C-31 Color Absorption

0.28" Quadruple Digit Numeric Displays. Technical Data Sheet. Model No.: KW4-281XSB

Managerial Economics Prof. Trupti Mishra S.J.M. School of Management Indian Institute of Technology, Bombay. Lecture - 13 Consumer Behaviour (Contd )

Important Question with Answer

Dolby Vision for the Home

Prepared by: Paul Lee ON Semiconductor

A Proposal for OpenEXR Color Management

ICC Profiles Guide. English Version 1.0

Sample Exercise 6.1 Concepts of Wavelength and Frequency

A Adobe RGB (1998) Color Image Encoding. Version May 2005

Digitization of Old Maps Using Deskan Express 5.0

Choosing a digital camera for your microscope John C. Russ, Materials Science and Engineering Dept., North Carolina State Univ.

Transcription:

CS 430/536 Computer Graphics I 3D Clipping Week 7, Lecture 14 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu 1

Outline 3D Clipping Light Physical Properties of Light and Color Eye Mechanism for Color Systems to Define Light and Color 2

Simple Mesh Format (SMF) Michael Garland http:// graphics.cs.uiuc.edu/~garland/ Triangle data Vertex indices begin at 1 3

3D Clipping Cohen-Sutherland and Cyrus-Beck can be trivially extended to 3D We will cover: Cohen-Sutherland for 3D, (parallel projection) Cohen-Sutherland for 3D, (perspective projection) 4

Recall: Cohen-Sutherland Line is completely visible iff both code values of endpoints are 0, i.e. If line segments are completely outside the window, then 5 Pics/Math courtesy of Dave Mount @ UMD-CP

Cohen-Sutherland for 3D, Use 6 bits Parallel Projection Trivially accept if all end-codes are 0 Trivially reject if bit-by-bit AND of end-codes is not 0 Up to 6 intersections may have to be computed bit 1 point ABOVE the view volume y > 1 bit 2 point BELOW the view volume y < -1 bit 3 point RIGHT OF the view volume x > 1 bit 4 point LEFT OF the view volume x < -1 bit 5 point BEHIND the view volume z < -1 bit 6 point IN FRONT the view volume z > 0 6

7 Cohen-Sutherland for 3D computing intersection points. Use parametric representation of the line to compute intersections So for y=1 replace y with 1 and solve for t If 1 t 0 use it to find x and z Test if x and z are in valid range Repeat for planes y=-1, x=1, x=-1, z=-1, z=0 ) ( ) ( ) ( 0 1 0 0 1 0 0 1 0 z z t z z y y t y y x x t x x! + =! + =! + = ) ( ) (1 0 1 0 y y y t!! =

Cohen-Sutherland for 3D, Perspective Projection Use 6 bits identical to parallel view volume clipping Conditions on the codes are different Trivially accept/reject lines using same roles Intersection points computed differently bit 1 point ABOVE the view volume y > -z bit 2 point BELOW the view volume y < z bit 3 point RIGHT OF the view volume x > -z bit 4 point LEFT OF the view volume x < z bit 5 point BEHIND the view volume z < -1 bit 6 point IN FRONT the view volume z > z min 8

9 Cohen-Sutherland for 3D computing intersection points. Intersections with planes z=-1, z=z min is the same. Calculating intersections with a sloping plane For plane y=z these two equations are equal Repeat for planes y=-z, x=z, x=-z ) ( ) ( ) ( 0 1 0 0 1 0 0 1 0 z z t z z y y t y y x x t x x! + =! + =! + = ) ( ) ( ) ( 0 1 0 1 0 0 z z y y y z t!!!! =

3D Clipping for HWs 4 & 5 Only do trivial reject test For HW4 just do X and Y tests AND all vertex bit codes for a polygon If result!= 0, then reject polygon i.e. remove from projection pipeline 14

More Efficient Alternative? Use Cohen-Sutherland to do trivial reject Project remaining polygons onto view plane Clip polygons in 2D Remember that user-defined window is redefined for canonical view volumes! 15

end clipping 16

Achromatic Light Light without color Basically Black-and- White Defined in terms of energy (physics) Intensity and luminance or Brightness (perceived intensity) 17 http://www.thornlighting.com/

Quantizing Intensities Q: Given a limited number of colors/ shades, which ones should we use? Suppose we want 256 shades Idea #1 (bad) 128 levels from 0.0 0.9 128 levels from 0.9 1.0 Problems Discontinuities at 0.9 Uneven distribution of samples 18

Quantizing Intensities Suppose we want 256 shades Idea #2 (also bad) Distribute them evenly Problem This is not how the human eye works! The eye is sensitive to relative intensity variations, not absolutes The intensity change between 0.10 and 0.11 looks like the change between 0.50 and 0.55 19

Optical Illusion 20

Optical Illusion Revealed 21

Quantizing Intensities Idea #3 Start with intensity I 0, go to I 255 =1 by making I 1 = r*i 0, I 2 = r*i 1, etc. I 0, I 1 = r*i 0, I 2 = r^2*i 0, I 255 = r^255*i 0 =1 r = (1/I 0 ) 1/255 = I 0-1/255 r j = I 0 -j/255 I j = r j I 0 = I 0 (1 - j/255) = I 0 (255-j)/255 r = (1/I 0 ) 1/n I j = r j I 0 = I 0 (n-j)/n 22

Selecting Intensities Dynamic range of a device Max intensity/min intensity Min display intensity ~ 1/500 th to 1/200 th of max Gamma correction: adjusting intensities to compensate for the device I = v γ, γ: 2 è 2.5 Implement w/ look-up table How many intensities are enough? Can t see changes below 1% 1.01 = (1/I 0 ) 1/n n = log 1.01 (1/I 0 ) I 0 = 1/200, n = 532 23

Chromatic Light! Let there be colored light! Major terms Hue Distinguish colors such as red, green, purple, etc. Saturation How far is the color from a gray of equal intensity (i.e. red=high saturation; pastels are low) Lightness Perceived intensity of the reflecting object Brightness is used when the object is an emitter 24

Physics of Light and Color Light: a physical phenomenon: Electromagnetic radiation in the [400 nm-700nm] wavelength range Color:psychological phenomenon: Interaction of the light of different wavelength with our visual system. 25 http://prometheus.cecs.csulb.edu/~jewett/colors/

Spectral Energy Distributions Violet 388-440nm Blue 440-490nm Green 490-565nm Yellow 565-590nm Orange 590-630nm Red 630-780nm # Photons White Less White (Gray) # Photons # Photons Laser Wavelength (nm) 400 500 600 700 Pure day light Wavelength (nm) 400 500 600 700 Wavelength (nm) 400 500 600 700 26 Foley/VanDam, 1990/1994

Colorimetry (Physics) Define color in terms of the light spectrum and wavelengths Dominant Wavelength: what we see Excitation Purity: saturation Luminance: intensity of light Ex: Pure color, 100% saturated, no white light White/gray lights are 0% saturated 27

Specifying Colors Can we specify colors using spectral distributions? We can, but we do not want to. More then one set of distributions corresponds to the same color. Reason? Too much information # Photons 400 500 600 700 Wavelength (nm) 28

Seeing in Color The eye contains rods and cones Rods work at low light levels and do not see color Cones come in three types (experimentally and genetically proven), each responds in a different way to frequency distributions 29 http://www.thornlighting.com/

Tristimulus Theory The human retina has 3 color sensors the cones Cones are tuned to red, green and blue light wavelengths Note: R&G are both yellowish Experimental data 30 Foley/VanDam, 1990/1994

Luminous-Efficiency Function The eye s response to light of constant luminance as the dominant wavelength is varied Peak sensitivity is at ~550nm (yellowgreen light) This is just the sum of the earlier curves 31 Foley/VanDam, 1990/1994

Eye Sensitivity Can distinguish 100,000s of colors, side by side When color only differs in hue, wavelength between noticeably different colors is between 2nm and 10nm (most within 4nm) Hence, 128 fully saturated hues can be distinguished Less sensitive to changes in hue when light is less saturated More sensitive at spectrum extremes to changes in saturation a about 23 distinguishable saturation grades/steps Static luminance dynamic range: 10,000:1 32

Device Sensitivity Static eye luminance dynamic range 10,000:1 With iris adjustment 1,000,000:1 CRT luminance range, 200:1 LCD luminance range, 5,000:1(?), 500:1 How to recreate on a monitor/scanner what the eye perceives? The focus of high dynamic range (HDR) imaging research 33

HDR Image 34

Terms Perceptual Term Hue Saturation Lightness self reflecting objects Brightness self luminous objects Colorimetry Dominant Wavelength Excitation purity Luminance Luminance 36

Color Models RGB Idea: specify color in terms of weighted sums of R-G-B Almost: may need some <0 values to match wavelengths Hence, some colors cannot be represented as sums of the primaries 37 Foley/VanDam, 1990/1994

RGB is an Additive Color Primary colors: red, green, blue Secondary colors: yellow = red + green, cyan = green + blue, magenta = blue + red. All colors: white = red + green + blue (#FFFFFF) black = no light (#000000). Model 38 http://prometheus.cecs.csulb.edu/~jewett/colors/

RGB Color Cube RGB used in Monitors and other light emitting devices TV uses YIQ encoding which is somewhat similar to RGB 39 http://prometheus.cecs.csulb.edu/~jewett/colors/

Color Models CMY Describes hardcopy color output We see colors of reflected light Cyan ink absorbs red light and reflects green and blue To make blue, use cyan ink (to absorb red), and magenta ink (to absorb green) 40 http://prometheus.cecs.csulb.edu/~jewett/colors/

CMY(K) is a Subtractive Color Primary colors: cyan, magenta, yellow Secondary colors: blue = cyan magenta red = magenta yellow green = yellow cyan All colors: black = cyan magenta yellow (in theory). Black (K) ink is used in addition to C,M,Y to produce solid black. white = no color of ink (on white paper, of course). Model 41 http://prometheus.cecs.csulb.edu/~jewett/colors/

Color Models XYZ Standard defined by International Commission on Illumination (CIE) since 1931 Defined to avoid negative weights These are not real colors X = k # P(")x " d" Y = k # P(")y " d" Z = k # P(")z " d" 42 Foley/VanDam, 1990/1994

Color Models XYZ Cone of visible colors in CIE space X+Y+Z=1 plane is shown Constant luminance Only depends on dominant wavelength and saturation 43 Foley/VanDam, 1990/1994

CIE Chromaticity Diagram Plot colors on the x + y + z = 1 plane (normalize by brightness) X x = X + Y + Z Y y = X + Y + Z Z z = X + Y + Z Gives us 2D Chromaticity Diagram 44 http://www.cs.rit.edu/~ncs/color/a_chroma.html

Working with Chromaticity Diagram C is white and close to x=y=z=1/3 E and F can be mixed to produce any color along the line EF Dominant wavelength of a color B is where the line from C through B meets the spectrum (D). E i A k F C B D j BC/DC gives saturation 45 http://www.cs.rit.edu/~ncs/color/a_chroma.html

Working with Chromaticity Diagram A & B are complementary colors. They can be combined to produce white light Colors inside ijk are linear combinations of i, j & k E i F C B D j A k 46 http://www.cs.rit.edu/~ncs/color/a_chroma.html

Gamut Gamut: all colors produced by adding colors - a polygon Green contour RGB Monitor White scanner Black printer Problem: How to capture the color of an original image with a scanner, display it on the monitor and print out on the printer? A triangle can t cover the space Can t produce all colors by adding 3 different colors together 47 http://www.cs.rit.edu/~ncs/color/a_chroma.html

Color Models YIQ.299.587.144.596.275.321.212.528.3 National Television System Committee (NTSC) " Y% " Y is same as XYZ model and $ ' $ $ I ' = $ represents brightness. # $ Q& ' # $ Uses 4MHz of bandwidth. I contains orange-cyan hue information (skin tones). Uses about 1.5 Mhz Q contains green-magenta hue information. Uses about 1.5 Mhz B/W TVs use only Y signal. 0.299 0.587 0.114 %" R ' $ 0.596 (0.275 (0.321 ' $ G 0.212 (0.528 0.311 &' # $ B % ' ' & ' 48

Tint-Shade-Tone Relationships of tints, shades and tones. Tints - mixture of color with white. Shades mixture of color with black. Both ignore one dimension. Tones respect all three. 49 Foley/VanDam, 1990/1994

HSB: hue, saturation, and brightness Also called HSV (hue saturation value) Hue is the actual color. Measured in degrees around the cone (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). At 0% saturation, hue is meaningless. Brightness is measured in percent from black (0) to white (100). At 0% brightness, both hue and saturation are meaningless. 50 http://www.mathworks.nl/

HLS hue, lightness, saturation Developed by Tektronix Hue define like in HSB. Complimentary colors 180 apart Gray scale along vertical axis L from 0 black to 1 white Pure hues lie in the L=0.5 plane Saturation again is similar to HSB model 51 http://www.adobe.com