Color and Color Models Angel 2.5 Angel: Interactive Computer Graphics5E © Addison-Wesley 2009 1.

Slides:



Advertisements
Similar presentations
Presented by: Stacy C. Lovell. How do we perceive color? Our eyes contain only 3 types of photosentitive cells tuned to three frequencies Red, Green,
Advertisements

1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Building Models modified by Ray Wisman Ed Angel Professor of Computer Science,
1 Building Models. 2 Objectives Introduce simple data structures for building polygonal models ­Vertex lists ­Edge lists OpenGL vertex arrays.
Computer Graphics(Fall 2003) COMS 4160, Lecture 7: OpenGL 3 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Pemrograman OpenGL Dasar
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
CMPE 466 COMPUTER GRAPHICS Chapter 5 Attributes of Graphics Primitives Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth.
Informationsteknologi Monday, October 29, 2007Computer Graphics - Class 21 Today’s class Graphics programming Color.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Computer Science,
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
Programming with OpenGL Part 0: 3D API March 1, 2007.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
CSC 461: Lecture 6 1 CSC461 Lecture 6: 2D Programming in OpenGL Objectives:  Fundamental OpenGL primitives  Attributes  Viewport.
Lecture 5 - Programming with OpenGL
JOGL in MS Windows GDI – Graphics Device Interface (Windows-specific) OpenGL Lib JOGL Commands GDI Processor Graphics Hardware JOGL Lib.
ATTRIBUTES OF GRAPHICS PRIMITIVES CA 302 Computer Graphics and Visual Programming Aydın Öztürk
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping Texture mapping.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical.
1. OpenGL/GLU/GLUT  OpenGL v4.0 (latest) is the “core” library that is platform independent  GLUT v3.7 is an auxiliary library that handles window creation,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Introduction to OpenGL Week 1 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico CS.
Computer Graphics Bing-Yu Chen National Taiwan University.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 43 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 43 Computer Graphics Programming with OpenGL I.
Graphics: Conceptual Model Real Object Human Eye Display Device Graphics System Synthetic Model Synthetic Camera Real Light Synthetic Light Source.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Building Models Ed Angel Professor Emeritus of Computer Science University of New Mexico Angel and Shreiner: Interactive Computer Graphics 7E © Addison-Wesley.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Programming with OpenGL Part 2: Complete Programs Ed Angel Professor.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
1 Programming with OpenGL Part 2: Complete Programs.
OpenGL API 2D Graphic Primitives Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Chapter 4 -- Color1 Color Open GL Chapter 4. Chapter 4 -- Color2 n The goal of almost all OpenGL applications is to draw color pictures in a window on.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Programming with OpenGL Part 4: Color and Attributes Isaac Gang University.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics I, Fall 2010 Building Models.
31/1/2006Based on: Angel (4th Edition) & Akeine-Möller & Haines (2nd Edition)1 CSC345: Advanced Graphics & Virtual Environments Lecture 2: Introduction.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 GPU.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs.
Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran
Computer Graphics Overview
CSC Graphics Programming
Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009
Programming with OpenGL Part 1: Background
Color Color is one of the most interesting aspects of both human perception and computer graphics. In principle, a display needs only three primary colors.
Programming with OpenGL Part 2: Complete Programs
Materi Anatomi OpenGL Fungsi GLUT Posisi Kamera Proyeksi
Objectives Simple Shaders Programming shaders with GLSL
OpenGL API 2D Graphic Primitives
Programming with OpenGL Part 2: Complete Programs
Building Models Ed Angel
Introduction to Computer Graphics with WebGL
Programming with OpenGL Part 4: Color and Attributes
Vectors, Normals, & Shading
Introduction to Computer Graphics with WebGL
Isaac Gang University of Mary Hardin-Baylor
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Introduction to Meshes
CSC418 Computer Graphics Shading Color.
Programming with OpenGL Part 2: Complete Programs
Programming with OpenGL Part 2: Complete Programs
Programming with OpenGL Part 4: Color and Attributes
Programming with OpenGL Part 2: Complete Programs
Introduction to Meshes
Presentation transcript:

Color and Color Models Angel 2.5 Angel: Interactive Computer Graphics5E © Addison-Wesley

COLOR Angel: Interactive Computer Graphics 5E © Addison-Wesley

Color Distribution Angel: Interactive Computer Graphics5E © Addison-Wesley

Color Formation Angel: Interactive Computer Graphics5E © Addison-Wesley

5 Color Values

HSV Cone Angel: Interactive Computer Graphics5E © Addison-Wesley

Angel: Interactive Computer Graphics5E © Addison-Wesley CIE 1931 color space chromaticity diagram

Color Gamut Angel: Interactive Computer Graphics5E © Addison-Wesley

Attributes Attributes are part of the OpenGL state and determine the appearance of objects –Color (points, lines, polygons) –Size and width (points, lines) –Stipple pattern (lines, polygons) –Polygon mode Display as filled: solid color or stipple pattern Display edges Display vertices Angel: Interactive Computer Graphics 5E © Addison-Wesley

OpenGL Attribute API glLineWidth(w); glPointSize(w); glClearColor(r,g,b,a); glColor3f(r,g,b); Angel: Interactive Computer Graphics5E © Addison-Wesley

RGB color Each color component is stored separately in the frame buffer Usually 8 bits per component in buffer Note in glColor3f the color values range from 0.0 (none) to 1.0 (all), whereas in glColor3ub the values range from 0 to 255 Angel: Interactive Computer Graphics 5E © Addison-Wesley

Indexed Color Colors are indices into tables of RGB values Requires less memory –indices usually 8 bits –not as important now Memory inexpensive Need more colors for shading Angel: Interactive Computer Graphics 5E © Addison-Wesley

Color and State The color as set by glColor becomes part of the state and will be used until changed –Colors and other attributes are not part of the object but are assigned when the object is rendered We can create conceptual vertex colors by code such as glColor glVertex glColor glVertex Angel: Interactive Computer Graphics 5E © Addison-Wesley

Smooth Color Default is smooth shading –OpenGL interpolates vertex colors across visible polygons Alternative is flat shading –Color of first vertex determines fill color glShadeModel (GL_SMOOTH) or GL_FLAT Angel: Interactive Computer Graphics 5E © Addison-Wesley