Computer graphics

Post on 03-Mar-2017

65 views 0 download

Transcript of Computer graphics

Graphics 1

Graphics & Graphical

Programming

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

Graphics 3

Computer Graphics is about animation (films)

Major driving force now

Graphics 4

Games are very important in Computer Graphics

Graphics 5

Medical Imaging is another driving force

Much financial support

Promotes linking of graphics with video, scans, etc.

Graphics 7

Scientific Visualisation To view below and

above our visual range

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

Graphics 9

Geometry Pipeline

Animation/Interaction : time

Modeling: shapes

Shading: reflection and lighting

Transformation: viewing

Hidden Surface Elimination Imaging

Pipeline

Graphics 10

Imaging Pipeline

Rasterization and Sampling

Texture Mapping

Image Composition

Intensity and Colour Quantization

Geometry

Framebuffer/Display

Pipeline

Graphics 11

An example through the pipeline…

The scene we are trying to represent:

Images courtesy of Picture Inc.

Graphics 12

Wireframe model – Orthographic views

Graphics 13

Perspective View

Graphics 14

Depth Cue

Graphics 15

Hidden Line Removal – add colour

Graphics 16

Constant Shading - Ambient

Graphics 17

Faceted Shading - Flat

Graphics 18

Gouraud shading, no specular highlights

Graphics 19

Specular highlights added

Graphics 20

Phong shading

Graphics 21

Texture mapping

Graphics 22

Texture mapping

Graphics 23

Reflections, shadows & Bump mapping

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.

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

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

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

Graphics 28

Raster interlaced scanning

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

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.