discrete techniques chapter 7 begun february 22, 2005 finished april 26, 2005

38
Discrete Techniques Discrete Techniques Chapter 7 Chapter 7 Begun February 22, 2005 Begun February 22, 2005 Finished April 26, 2005 Finished April 26, 2005

Upload: clemence-johnson

Post on 04-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Discrete TechniquesDiscrete Techniques

Chapter 7Chapter 7

Begun February 22, 2005Begun February 22, 2005

Finished April 26, 2005 Finished April 26, 2005

Page 2: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

BuffersBuffers

Frame buffer consists of Frame buffer consists of Front color bufferFront color buffer Back color bufferBack color buffer Depth bufferDepth buffer

Each buffer has the dimensions (Each buffer has the dimensions (nn x x mm) of the ) of the display window.display window.

The depth (The depth (kk) of each buffer can vary. For RGB, ) of each buffer can vary. For RGB, it would be the number of bits per color X 3 it would be the number of bits per color X 3 colors. colors.

Bitplane refers to any of the Bitplane refers to any of the k nk n x x mm planes. planes.

Page 3: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Digital ImagesDigital Images

Glubyte myColorImage [512][512]Glubyte myColorImage [512][512][3];[3];

Glubyte myGrayImage [512][512];Glubyte myGrayImage [512][512]; Glubyte myLUTImage [512][512], Glubyte myLUTImage [512][512], red[256], green[256], red[256], green[256], blue[256];blue[256];

Page 4: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Creating Digital ImagesCreating Digital Images

With an algorithm.With an algorithm. From data.From data. From standard image formats.From standard image formats.

GIFGIF TIFFTIFF PSPS EPSEPS JPEGJPEG OpenGL does not support image formats.OpenGL does not support image formats.

From graphics system.From graphics system.

Page 5: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Writing Into BuffersWriting Into Buffers

Bitblt write operationBitblt write operation Write_block(Write_block(

source /* buffer */,source /* buffer */, n /* nrows */, n /* nrows */, m /* ncols */, m /* ncols */, x /* lower left x pos */,x /* lower left x pos */, y /* lower left y pos */,y /* lower left y pos */, destination /* buffer */, destination /* buffer */, u /* destination pos x */, u /* destination pos x */, v /* destination pos y */);v /* destination pos y */);

Page 6: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Writing ModesWriting Modes

Define writeDefine write Simple assignmentSimple assignment

x1 = x2x1 = x2

Replacement functionReplacement function d = f(d, s)d = f(d, s)

Page 7: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Writing With XORWriting With XOR

Most interesting functionMost interesting function Painting ApplicationPainting Application

S S S xor M S xor M M M S xor M S xor M S S S xor M S xor M

Page 8: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Bit and Pixel Operations in Bit and Pixel Operations in OpenGLOpenGL

Defines an internal cursorDefines an internal cursor glRasterPos3f(x, y, z);glRasterPos3f(x, y, z); glBitmap(width, /* # bits wide */glBitmap(width, /* # bits wide */

height, /* # bits high */height, /* # bits high */x0, /*offset from current x0, /*offset from current

raster position */raster position */y0, /* offset from current y0, /* offset from current

rster position */rster position */xi, /* x increment */xi, /* x increment */

Xy, /* y increment */Xy, /* y increment */

Page 9: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Raster FontsRaster Fonts

Page 10: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Pixels and ImagesPixels and Images

Page 11: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Lookup TablesLookup Tables

Page 12: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Buffers for PickingBuffers for Picking

Page 13: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Mapping MethodsMapping Methods

Page 14: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Texture MappingTexture Mapping

Page 15: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

2D Texture Mapping2D Texture Mapping

Page 16: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Texture Mapping in OpenGLTexture Mapping in OpenGL

Page 17: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Texture Objects and Texture Objects and MultitexturingMultitexturing

Page 18: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Texture GenerationTexture Generation

Page 19: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Environmental MapsEnvironmental Maps

Page 20: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Bump MapsBump Maps

Page 21: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Compositing TechniquesCompositing Techniques

Page 22: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Opacity and BlendingOpacity and Blending

Page 23: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Image CompositingImage Compositing

Page 24: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Blending and Compositing in Blending and Compositing in OpenGLOpenGL

Page 25: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

AntialiasingAntialiasing

Page 26: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Back-to-front and Front-to-Back-to-front and Front-to-back Renderingback Rendering

Page 27: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Depth Cue and FogDepth Cue and Fog

Page 28: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Multirendering and the Multirendering and the Accumulation BufferAccumulation Buffer

Page 29: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Scene AntialiasingScene Antialiasing

Page 30: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Bump Mapping and Bump Mapping and EmbossingEmbossing

Page 31: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Image ProcessingImage Processing

Page 32: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Image ExtensionsImage Extensions

Page 33: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Other Multipass MethodsOther Multipass Methods

Page 34: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Sampling and AntialiasingSampling and Antialiasing

Page 35: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Sampling TheorySampling Theory

Page 36: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

ReconstructionReconstruction

Page 37: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

QuantizationQuantization

Each sample must be quantized into k Each sample must be quantized into k discrete levels.discrete levels. Analog Scale - whole number of lbsAnalog Scale - whole number of lbs Image - pixel colorImage - pixel color

Binary image - two colors, b/wBinary image - two colors, b/w

Page 38: Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005

Program 4Program 4

Due March 3, 2005Due March 3, 2005 Documentation 10%Documentation 10% Style 10%Style 10% Compiles 30%Compiles 30% Graphic Output 10%Graphic Output 10%