CAD CAM

70
INDIAN INSTITUTE OF TECHNOLOGY ROORKEE DEPARTMENT OF CIVIL ENGINEERING CE201: Computer Aided Graphics Week 2 Rajat Rastogi [email protected] [email protected]

Transcript of CAD CAM

Page 1: CAD CAM

INDIAN INSTITUTE OF TECHNOLOGY ROORKEEDEPARTMENT OF CIVIL ENGINEERING

CE‐201: Computer Aided GraphicsWeek 2

Rajat Rastogi

[email protected]@iitr.ernet.in

Page 2: CAD CAM

Last weekLast week

• Intro to CGIntro to CG– Graphics, sketching, photography

• Rendering Modelling and Animation• Rendering, Modelling and Animation

• Applications of CG– Movies, Games, Entertainment, CAD, Art, Interactive graphics, Education, Training, Vi li ti D i iVisualization, Designing

• Advancement in GPUs

August 19, 2010 2Rajat Rastogi

Page 3: CAD CAM

OutlineOutline

• Graphic PipelineGraphic Pipeline

• CG Processes

G hi i l S d h l i• Graphic Display Systems and technologies

• Display Devices

• Input‐Output Devices

August 19, 2010 Rajat Rastogi 3

Page 4: CAD CAM

GRAPHIC PIPELINEComputer Aided Graphics

GRAPHIC PIPELINE

August 19, 2010 Rajat Rastogi, DOCE 4

Page 5: CAD CAM

Graphic Pipeline….1Graphic Pipeline….1

1. Geometric 2. Transformations1. Geometric Representation• Formation of an object

2. Transformations• Adjusting the object to get a desired formT f ti• Working from object space 

to image space• Transformation processes

3. Viewing• Scan ‐Converting  the gdesired object  for display systems

• Viewing Transformations

August 19, 2010 Rajat Rastogi, DOCE 5

Page 6: CAD CAM

Graphic Pipeline….2Graphic Pipeline….2Architecture of Graphical system

yy y

x

x x

Geometric Representation(joining vertices  

Transformation(Placement of triangle (s)

Scan Conversion (lines drawn using a set ofusing two‐

dimensional Cartesian coordinates)

triangle (s) –location, orientation; size of triangle)

using a set of pixels)

August 19, 2010 Rajat Rastogi, DOCE 6

coordinates)

Page 7: CAD CAM

Graphic Pipeline…3Graphic Pipeline…3

Object spacey

x

Image space

August 19, 2010 Rajat Rastogi, DOCE 7

Page 8: CAD CAM

Graphic Pipeline…4Graphic Pipeline…4

• Geometrical Representation:Geometrical Representation:– Drawing primitives like  point, line, circle, polygon

Coordinate system to represent such primitives– Coordinate system to represent such primitives

– Working with concepts and algorithms

P j ti t lik ti– Projection systems like perspective or orthographic systems

August 19, 2010 Rajat Rastogi, DOCE 8

Page 9: CAD CAM

Graphic Pipeline…5Graphic Pipeline…5

• Transformations:Transformations:– Using transformations to define location, orientation and size of an objectorientation and size of an object

– Involves basic transformations like scale, translation and rotation, as well as, specifictranslation and rotation, as well as, specific translations like shear and reflection

– Knowledge of matrix operations is neededg p

– Homogenous coordinate system is adopted

August 19, 2010 Rajat Rastogi, DOCE 9

Page 10: CAD CAM

Graphic Pipeline…6Graphic Pipeline…6

• Transformations:Transformations:– Also involves various processes like

• ModellingModelling

• Hidden surface or a line

• Depth cueingp g

• Depth clipping

• Wireframes

• Shading and textures

• Curved surfaces

fl d d l• Reflections and displacements, etc.

August 19, 2010 Rajat Rastogi, DOCE 10

Page 11: CAD CAM

Graphic Pipeline…7Graphic Pipeline…7

• Viewing:Viewing:– Scan‐conversion of objects for display systems

Working with coordinate systems like viewing– Working with coordinate systems like viewing coordinate system,  display coordinate system, world coordinate system, etc.world coordinate system, etc.

– Possible to display complete or a part of the object as in case of media wallsj

August 19, 2010 Rajat Rastogi, DOCE 11

Page 12: CAD CAM

Graphic Pipeline…8Graphic Pipeline…8

• Viewing:Viewing:– Aliasing effect of conversion

• Distortion induced by the conversion from continuousDistortion induced by the conversion from continuous space to discrete space

• Effect changes with the change in size of pixel

• Pixels define memory space required– If one pixel is cut in half, horizontally and vertically, then it requires four time memory spacerequires four time memory space

• Anti‐aliasing: area of CG where negative impact of aliasing effect is alleviated.

August 19, 2010 Rajat Rastogi, DOCE 12

Page 13: CAD CAM

Graphic Pipeline…9Graphic Pipeline…9

• 3‐Dimensional Graphics3 Dimensional Graphics– Profound difference between object and its representation onto a 2‐dimensional displayrepresentation onto a 2 dimensional display surface

– Projection methods are needed to represent 3‐Projection methods are needed to represent 3dimensional objects

HiddenHidden surfaces

August 19, 2010 Rajat Rastogi, DOCE 13

Page 14: CAD CAM

Graphic Pipeline…10Graphic Pipeline…10

• 3‐Dimensional Graphics3 Dimensional Graphics– Adding projection and hidden surface removal to simple graphic pipeline right after transformationsimple graphic pipeline, right after transformation but before scan conversion, results in a three‐dimensional graphics.

Projection system

Hidden surfaces

August 19, 2010 Rajat Rastogi, DOCE 14

Page 15: CAD CAM

Graphic Pipeline…11Graphic Pipeline…11

CPU

GPU

August 19, 2010 Rajat Rastogi, DOCE 15

Page 16: CAD CAM

Transformation, Projection, Cuing, Clipping, Surfaces, 

CG PROCESSES

a s o at o , oject o , Cu g, C pp g, Su aces,Shading, Mapping

CG PROCESSES

August 19, 2010 Rajat Rastogi, DOCE 16

Page 17: CAD CAM

ModellingModelling

• generating modelsg g– lines, curves, polygons, smooth surfaces– digital geometry

17

Page 18: CAD CAM

Modelling Transformation: Object PlacementModelling Transformation: Object Placement

18

Page 19: CAD CAM

Viewing Transformation: Camera PlacementViewing Transformation: Camera Placement

19

Page 20: CAD CAM

Perspective ProjectionPerspective Projection

20

Page 21: CAD CAM

Depth CueingDepth Cueing

21

Page 22: CAD CAM

Depth ClippingDepth Clipping

22

Page 23: CAD CAM

Colored WireframesColored Wireframes

23

Page 24: CAD CAM

Hidden Line RemovalHidden Line Removal

24

Page 25: CAD CAM

Hidden Surface RemovalHidden Surface Removal

25

Page 26: CAD CAM

Curved SurfacesCurved Surfaces

26

Page 27: CAD CAM

Per‐Polygon ShadingPer Polygon Shading

27

Page 28: CAD CAM

Gouraud ShadingGouraud Shading

28

Page 29: CAD CAM

Phong ShadingPhong Shading

29

Page 30: CAD CAM

Complex Lighting and ShadingComplex Lighting and Shading

30

Page 31: CAD CAM

Texture MappingTexture Mapping

31

Page 32: CAD CAM

Displacement MappingDisplacement Mapping

32

Page 33: CAD CAM

Reflection MappingReflection Mapping

33

Page 34: CAD CAM

Specular ReflectionSpecular Reflection

34

Page 35: CAD CAM

RENDERINGChanges occurred during last 5‐10 years

August 19, 2010 Rajat Rastogi, DOCE 35

Page 36: CAD CAM

RenderingRendering

• Creating images from modelsCreating images from models– geometric objects

• lines, polygons, curves, curved surfaces, p yg , ,

– camera• pinhole camera, lens systems, orthogonal

– shading• light interacting with material

• illustration of rendering capabilities

August 19, 2010 Rajat Rastogi, DOCE 36

Page 37: CAD CAM

Computer GraphicsComputer Graphics

• Difference between • One is offline and otherDifference between watching a fiction movie or playing a 

One is offline and other is interactive

computer game?

August 19, 2010 Rajat Rastogi, DOCE 37

Page 38: CAD CAM

Interactive GraphicsInteractive Graphics

Frame rate and flicker rate

System latency

August 19, 2010 Rajat Rastogi, DOCE 38

Page 39: CAD CAM

Offline Rendering some years backOffline Rendering some years back

August 19, 2010 Rajat Rastogi, DOCE 39

Page 40: CAD CAM

Modern RenderingModern Rendering

August 19, 2010 Rajat Rastogi, DOCE 40

Page 41: CAD CAM

Modern RenderingModern Rendering

August 19, 2010 Rajat Rastogi, DOCE 41

Page 42: CAD CAM

Interactive Rendering some years back

August 19, 2010 Rajat Rastogi, DOCE 42

Page 43: CAD CAM

Interactive Rendering nowInteractive Rendering now

August 19, 2010 Rajat Rastogi, DOCE 43

Page 44: CAD CAM

Interactive Rendering nowInteractive Rendering now

August 19, 2010 Rajat Rastogi, DOCE 44

Page 45: CAD CAM

AnimationAnimation

• generating motiongenerating motion– interpolating between frames, states

http://www.cs.ubc.ca/~van/papers/doodle.html

45

Page 46: CAD CAM

AnimationAnimation

Sequence of still frames per secondSequence of still frames per second– Update rate: minimum of 24 hz 

Video playback: minimum of 30 hz– Video playback: minimum of 30 hz 

– Flicker rate: minimum of 50 hz 

“Rule 1”:All discontinuous frame to frame changes– All discontinuous frame‐to‐frame changes correspond to discontinuous scene or visibility changes

46

changes

Page 47: CAD CAM

GRAPHIC SYSTEMSVideo Display Technologies

GRAPHIC SYSTEMS

August 19, 2010 47Rajat Rastogi

Page 48: CAD CAM

Cathode Ray Tubes (CRTs)Cathode Ray Tubes (CRTs)

• Most common display device todayMost common display device today

• Extremely high voltage

• ComponentsComponents– Electron gun– Focusing and deflection systems– Phosphor‐coated screen– Glass tube envelope maintaining 

vacuumvacuum

August 19, 2010 48Rajat Rastogi

Page 49: CAD CAM

CRTs…1CRTs…1

August 19, 2010 49Rajat Rastogi

Page 50: CAD CAM

CRTs…2CRTs…2

• Electron GunElectron Gun– Contains a heating filament that emits a stream of electrons

– Electrons are focused with an electromagnet into a sharp beam and directed to a specific point of the face of the picture tubepicture tube

– The front surface of the picture tube is coated with small phospher dots

– When the beam hits a phospher dot it glows with a brightness proportional to the strength of the beam and how long it is hithow long it is hit

August 19, 2010 50Rajat Rastogi

Page 51: CAD CAM

CRTs…3CRTs…3

• Intensity of the electron beam is controlled by setting voltage y y g glevel on the control grid. Negative voltage will decrease the number of electrons passing through.

A th di t t ll d b b i t d th• As the distance travelled by a beam increases towards the periphery of the screen, due to its curvature, displayed image become blurred.

• Deflection of the electron beam can be controlled either with electric field or with magnetic field.

El f h h hi h i d• Electrons transfer energy to phosphor, which excites and on heating gives light energy producing glowing spot, which fades as phosphor returns back to ground energy level.

August 19, 2010 51Rajat Rastogi

Page 52: CAD CAM

CRTs…4CRTs…4

The frequency or color of the light emitted byof the light emitted by the phosphor is proportional to the 

diffenergy difference between the excited quantum state and the 

August 19, 2010 52Rajat Rastogi

ground state.

Page 53: CAD CAM

CRTs…5CRTs…5

• Phosphors are defined either by colour or their persistence (how long they continue to emit light).

• Persistence is defined as time it takes the emitted light from the screen to decay to one‐tenth of its original intensity.

• Phosphor with lower persistence is useful for animation; and with higher persistence is useful for highly complex, static pictures.

• Usual persistence range for graphic monitors is 10 to 60 microseconds.

• Resolution of CRT is defined as maximum number of points per centimeter that can be plotted horizontally or vertically.

August 19, 2010 Rajat Rastogi 53

Page 54: CAD CAM

CRTs…6CRTs…6

• Resolution:– Two illuminated phosphor spots are distinguishable when their separation is greater than the diameter at hich a spot intensit has fallen to 60 percent ofwhich a spot intensity has fallen to 60 percent of 

maximum– Dependent uponp p

• Type of phosphor• Intensity to be displayed• Focusing and deflection systems• Focusing and deflection systems

– High definition system: basically high resolution system, 1280 x 1024 or higher

August 19, 2010 Rajat Rastogi 54

Page 55: CAD CAM

CRTs…7CRTs…7

• Aspect Ratio:p– Ratio of vertical points to horizontal points necessary to produce equal length lines in both directions on the screen.screen. 

– Ex. ¾ means length of 3 points on vertical line = length of 4 points on horizontal line

• Measuring capabilities of CRT• Measuring capabilities of CRT– Size of tube (= length of screen diagonal)– Brightness of phosphers vs. darkness of tube– Speed of electron gun– Width of electron beam – Pixels

August 19, 2010 Rajat Rastogi 55

Page 56: CAD CAM

Direct‐View Storage Tubes (DVST)Direct View Storage Tubes (DVST)

• DVST stores the picture information as a charge S s o es e p c u e o a o as a c a gedistribution just behind the phosphor coated screen.

• It uses two electron guns, primary gun stores picture pattern and flood gun maintains picture display.

• There is no need to refresh screen, hence very complex i t b di l d t hi h l tipictures can be displayed at very high resolutions 

without flicker.

• Because of storage process a section of picture cannotBecause of storage process, a section of picture cannot be erased and the whole picture is to be erased and redrawn. Now replaced by raster systems.

August 19, 2010 Rajat Rastogi 56

Page 57: CAD CAM

Flat Panel DisplaysFlat Panel Displays

• Flat CRTsFlat CRTs

• Plasma Panels

i id l di l• Liquid crystal displays– Two categories

• Emissive displays: devices that convert electrical energy into light. Ex. Plasma panel, thin‐film electroluminescent displays, light‐emitting diodeselectroluminescent displays, light emitting diodes

• Non‐emissive or reflective displays: use optical effects to convert light from a source into graphic patterns. Ex. LCD

August 19, 2010 Rajat Rastogi 57

Page 58: CAD CAM

Plasma PanelsPlasma Panels

• Also called gas‐discharge displays, constructed by filling a so ca ed gas d sc a ge d sp ays, co s uc ed by g amixture of gas (usually has neon) between two glass plates. 

• The gas is excited by electric field emitting UV light.

• UV light excites phorphor. 

• Phosphor relaxes and emits some other colour

Gas at intersection of hori. and vert. conductors break down on application of high voltage into glowing plasma of electrons and

August 19, 2010 Rajat Rastogi 58

glowing plasma of electrons and ions

Page 59: CAD CAM

Plasma Panels…1Plasma Panels…1

August 19, 2010 Rajat Rastogi 59

Page 60: CAD CAM

Organic Light Emitting DiodeOrganic Light Emitting Diode

• The display of the future? Many think so.The display of the future?  Many think so.

• OLEDs function like regular semiconductor LEDs

• But they emit lightBut they emit light– Thin‐film deposition of organic, light‐emitting molecules through vapor sublimation in a vacuum.

– Dope emissive layers with fluorescent molecules to create colormolecules to create color.

August 19, 2010 Rajat Rastogi 60

Page 61: CAD CAM

Liquid Crystal Display (LCD)Liquid Crystal Display (LCD)

• LCDs: organic molecules, naturally in crystalline state,LCDs: organic molecules, naturally in crystalline state, that liquefy when excited by heat or E field

• Crystalline state twists polarized light 90º y p g

• Flat panel displays commonly use nematic (threadlike) liquid crystal compoundsq y p

• It consists of – Liquid crystals

– Glass plates ‐ 2

– Light polarizer – 2 at 90o

– Transparent conductors – built into glass plates at 90o

August 19, 2010 Rajat Rastogi 61

Page 62: CAD CAM

LCD…1LCD…1

August 19, 2010 Rajat Rastogi 62

Page 63: CAD CAM

LCD…2LCD…2

• Passive matrix LCDPassive matrix LCD

August 19, 2010 Rajat Rastogi 63

Page 64: CAD CAM

LCD…3LCD…3

• Active‐Activematrix LCDLCD

August 19, 2010 Rajat Rastogi 64

Page 65: CAD CAM

Virtual Reality SystemsVirtual Reality Systems

August 19, 2010 Rajat Rastogi 65

Page 66: CAD CAM

Media Walls – Multiscreen DisplayMedia Walls  Multiscreen Display 

August 19, 2010 Rajat Rastogi 66

Page 67: CAD CAM

Media Walls – Multiscreen DisplayMedia Walls  Multiscreen Display 

August 19, 2010 Rajat Rastogi 67

Page 68: CAD CAM

Graphic Monitors / WorkstationsGraphic Monitors / Workstations

August 19, 2010 Rajat Rastogi 68

Page 69: CAD CAM

Input DevicesInput Devices

Spaceball

Trackball

August 19, 2010 Rajat Rastogi 69

Page 70: CAD CAM

Output DevicesOutput Devices

August 19, 2010 Rajat Rastogi 70