Computer graphics

30
Graphics 1 Graphics & Graphical Programming

Transcript of Computer graphics

Page 1: Computer graphics

Graphics 1

Graphics & Graphical

Programming

Page 2: Computer graphics

Graphics 2

Computer Graphics The experimentation of cathode rays is largely accredited to J.J.

Thomson, an English physicist who, in his three famous

experiments, was able to deflect cathode rays, a fundamental

function of the modern CRT. The earliest version of the CRT was

invented by the German physicist Ferdinand Braun in 1897 and is

also known as the Braun tube

Page 3: Computer graphics

Graphics 3

Computer Graphics is about animation (films)

Major driving force now

Page 4: Computer graphics

Graphics 4

Games are very important in Computer Graphics

Page 5: Computer graphics

Graphics 5

Medical Imaging is another driving force

Much financial support

Promotes linking of graphics with video, scans, etc.

Page 7: Computer graphics

Graphics 7

Scientific Visualisation To view below and

above our visual range

Page 8: Computer graphics

Graphics 8

Graphics Pipelines

• Graphics processes generally execute

sequentially

• Typical ‘pipeline’ model

• There are two ‘graphics’ pipelines

– The Geometry or 3D pipeline

– The Imaging or 2D pipeline

Page 9: Computer graphics

Graphics 9

Geometry Pipeline

Animation/Interaction : time

Modeling: shapes

Shading: reflection and lighting

Transformation: viewing

Hidden Surface Elimination Imaging

Pipeline

Page 10: Computer graphics

Graphics 10

Imaging Pipeline

Rasterization and Sampling

Texture Mapping

Image Composition

Intensity and Colour Quantization

Geometry

Framebuffer/Display

Pipeline

Page 11: Computer graphics

Graphics 11

An example through the pipeline…

The scene we are trying to represent:

Images courtesy of Picture Inc.

Page 12: Computer graphics

Graphics 12

Wireframe model – Orthographic views

Page 13: Computer graphics

Graphics 13

Perspective View

Page 14: Computer graphics

Graphics 14

Depth Cue

Page 15: Computer graphics

Graphics 15

Hidden Line Removal – add colour

Page 16: Computer graphics

Graphics 16

Constant Shading - Ambient

Page 17: Computer graphics

Graphics 17

Faceted Shading - Flat

Page 18: Computer graphics

Graphics 18

Gouraud shading, no specular highlights

Page 19: Computer graphics

Graphics 19

Specular highlights added

Page 20: Computer graphics

Graphics 20

Phong shading

Page 21: Computer graphics

Graphics 21

Texture mapping

Page 22: Computer graphics

Graphics 22

Texture mapping

Page 23: Computer graphics

Graphics 23

Reflections, shadows & Bump mapping

Page 24: Computer graphics

Graphics 24

Computer Graphics A cathode ray tube is a vacuum tube which consists of one or more

electron guns, possibly internal electrostatic deflection plates, and

a phosphor target.

An image is produced by controlling the intensity of each of the

three electron beams, one for each additive primary color (red,

green, and blue).

In all modern CRT monitors and televisions, the beams are bent

by magnetic deflection, a varying magnetic field generated by coils

and driven by electronic circuits around the neck of the tube,

although electrostatic deflection is commonly used in

oscilloscopes, a type of diagnostic instrument.

Page 25: Computer graphics

Graphics 25

Graphics Definitions

• Point

– a location in space, 2D or 3D

– sometimes denotes one pixel

• Line

– straight path connecting two points

– infinitesimal width, consistent density

– beginning and end on points

Page 26: Computer graphics

Graphics 26

Graphics Definitions

• Vertex

– point in 3D

• Edge

– line in 3D connecting two vertices

• Polygon/Face/Facet

– arbitrary shape formed by connected vertices

– fundamental unit of 3D computer graphics

Page 27: Computer graphics

Graphics 27

Graphics Definitions

• Raster

– derived from TV systems for a row of pixels

– commonly referred to as a scanline

– does influence algorithms – reducing memory

requirements, parallelism, etc.

– is the derivation of rasterization, scan-line

algorithms

Page 28: Computer graphics

Graphics 28

Raster interlaced scanning

Page 29: Computer graphics

Graphics 29

Raster pros and cons

•Disadvantages

•Requires screen-sized memory array

•Discrete spatial sampling (pixels)

•Moire patterns result when shadow-mask and

dot-pitch frequencies are mismatched

•Convergence (varying angles of approach

distance of e-beam across CRT face)

•Limit on practical size (< 40 inches)

•Spurious X-ray radiation

•Occupies a large volume

•Advantages

•Allows solids to be displayed

•Uses low-cost CRT H/W (TVs)

•Whole Screen is constantly updated

•Bright light-emitting display technology

Page 30: Computer graphics

Graphics 30

Summary • The course is about algorithms, not application

packages

• Graphics execution is a pipelined approach

• Most of the steps introduced with an example

• Basic definitions presented

• Some support resources indicated

• www.massey.ac.nz/~kahawick/159235

• Acknowledgements - Thanks to Eric McKenzie, Edinburgh, from whose Graphics Course some of these slides are based.