2M050: PC Design.


104 views
Uploaded on:
Category: Fashion / Beauty
Description
2M050: PC Design Jack van Wijk vanwijk@win.tue.nl HG6.71 Points Present essential representation ideas and phrasing Base for advancement of 2D intelligent PC illustrations programs (OGO 2.3) Writing
Transcripts
Slide 1

2M050: Computer Graphics Jack van Wijk vanwijk@win.tue.nl HG6.71

Slide 2

Aims Introduce essential representation ideas and phrasing Base for advancement of 2D intuitive PC design programs (OGO 2.3)

Slide 3

Literature Computer Graphics - Principles and Practice Foley - van Dam - Feiner - Hughes second release in C - Addison and Wesley Computer Graphics - C Version Donald Hearn - M. Pauline Baker second version - universal release Prentice Hall

Slide 4

Overview Introduction Geometry Interaction Raster representation

Slide 5

Introduction What is Computer Graphics? Applications Computer Graphics in Eindhoven Raster/vector representation Hardware

Slide 6

Computer Graphics Computer Graphics is pervasive: Visual framework is most vital sense: High transfer speed Natural correspondence Fast improvements in Hardware Software

Slide 7

Computer Graphics Image Analysis (design acknowledgment) Mathematical Model Image Synthesis (Rendering) Modeling Image preparing

Slide 8

Supporting Disciplines Computer science (calculations, information structures, programming building, …) Mathematics (geometry, numerical, …) Physics (Optics, mechanics, …) Psychology (Color, recognition) Art and outline

Slide 9

Applications Computer Aided Design (CAD) Computer Aided Geometric Design (CAGD) Entertainment (movement, diversions, …) Geographic Information Systems (GIS) Visualization (Scientific Vis., Inform. Vis.) Medical Visualization …

Slide 10

Computer Graphics Eindhoven Current: Information perception Interactive 3D outline Virtual reality Past: Rasterization, Animation Jack van Wijk Kees Huizing Arjan Kok Robert van Liere Wim Nuij Alex Telea Huub van de Wetering

Slide 11

Interactive Computer Graphics User data Application Screen picture

Slide 12

Model Geometry, shading Graphics pipeline User Edit Map Screen Display

Slide 13

Representations in illustrations Vector Graphics Image is spoken to by nonstop geometric articles: lines, bends, and so on. Raster Graphics Image is spoken to as a rectangular lattice of shaded squares

Slide 14

Vector design Graphics objects: geometry + shading Complexity ~ O(number of items) Geometric change conceivable without loss of data (zoom, pivot, …) Diagrams, plans, ... Illustrations: PowerPoint, CorelDraw, ...

Slide 15

Raster design Generic Image preparing methods Geometric Transformation: loss of data Complexity ~ O(number of pixels) Jagged edges, against associating Realistic pictures, surfaces, ... Samples: Paint, PhotoShop, ...

Slide 16

Conversion Vector design Rasterization, Pattern acknowledgment Scan transformation Raster representation

Slide 17

Hardware Vector illustrations Raster representation Color lookup table 3D rendering equipment

Slide 18

Display rundown move 10 20 line 20 40 ... burn O V E C T O R roast R Vector Graphics Hardware consistent & smooth lines no filled items arbitrary sweep invigorate pace relies on upon unpredictability of the scene Display Controller

Slide 19

Frame cushion 0 7 6 0 7 0 Raster Graphics Hardware Video Controller R A S T E R jaggies (stair packaging) filled articles (anti)aliasing revive speed free of scene multifaceted nature pixel check transformation determination bit planes

Slide 20

shading file Frame support R G B 0 7 6 102 255 53 1 0 7 0 255 204 2 0 255 102 153 4 0 ... 102 0 51 7 Color Lookup Table CLUT: pixel = code True shading: pixel = R,G,B

Slide 21

3D rendering equipment Geometric representation: Triangles Viewing: Transformation Hidden surface evacuation: z-cushion Lighting and brightening: Gouraud shading Realism: composition mapping Special impacts: straightforwardness, antialiasing

Slide 22

2D geometric demonstrating Coordinates Transformations Parametric and certain representations Algorithms

Slide 23

Coordinates Point: position on plane p = ( p x , p y ) x = ( x, y ) x = ( x 1 , x 2 ) x = x 1 e 1 + x 2 e 2 , e 1 = (1, 0), e 2 = (0, 1) Vector: course and size v = ( v x , v y ), and so forth y p v x

Slide 24

Vector number-crunching Addition of two vectors: v + w = ( v x + w x , v y + w y ) Multiplication vector-scalar: a v = ( a v x , a v y ) y v + w v x y 2 v x

Slide 25

Coordinate frameworks world train wheel picture

Slide 26

Why changes? Model of articles world directions: km, mm, and so forth various leveled models: human = middle + arm + arm + head + leg + leg arm = upperarm + lowerarm + hand … Viewing zoom in, move drawing, and so on.

Slide 27

Transformation sorts Translate as per vector v : t = p + v Scale with component s : s = s p Rotate over edge a: r x = cos( a ) p x - sin( a ) p y r y = sin( a ) p x + cos( a ) p y s t r v p a x

Slide 28

Homogeneous directions Unified representation of turn, scaling, interpretation Unified representation of focuses and vectors Compact representation for successions of changes Here: helpful documentation, significantly more to it

Slide 29

Homogeneous arranges Extra facilitate included: p = ( p x , p y , p w ) or x = ( x, y, w ) Cartesian directions: partition by w x = ( x/w , y/w ) Here: for a point w = 1, for a vector w = 0

Slide 30

Matrices for change

Slide 31

Direct elucidation y’ ( x, y ) y ( x’,y’ ) x b a t x’

Slide 32

Translation network

Slide 33

Scaling framework

Slide 34

Rotation grid

Slide 35

x’’’ y’’’ x’ y’ x’’ y’’ Sequences of changes y x Sequences of changes can be portrayed with a solitary change lattice, which is the consequence of link of all changes.

Slide 36

y’’ y’ y’’ x’’ y y’ x’ x Order of changes Matrix duplication is not commutative. Diverse requests of duplication give distinctive results.

Slide 37

Order of changes Pre-increase: x’ = M n M n-1 …M 2 M 1 x Transformation M n in worldwide directions Post-augmentation: x’ = M 1 M 2 …M n-1 M n x Transformation M n in neighborhood organizes, i.e., the direction framework that outcomes from utilization of M 1 M 2 …M n-1

Slide 38

Window and Viewport: Area on screen to be utilized for drawing. Unit: pixels (screen directions) Note: y - pivot regularly focuses down Window: Virtual region to be utilized by application Unit: km, mm,… (world directions) (800,600) (600,400) (200,200) (0,0) (2,1) (- 2,- 1)

Slide 39

Window/viewport change Determine a network M, such that the window (w x1 , w x2 , w y1 , w y2 ) is mapped on the viewport (v x1 , v x2 , v y1 , v y2 ): A = T(- w x1 , - w y1 ) B = S(1/(w x2 - w x1 ), 1/(w y2 - w y1 )) A C = S(v x2 - v x1 ,v y2 - v y1 )B M = T(v x1 , v y1 ) C

Slide 40

Forward and in reverse ( v x2 , v y2 ) Viewport x’: screen directions Drawing : (meters to pixels) Use x ’ = M x Picking : (pixels to meters) Use x = M - 1 x’ ( v x1 , v y1 ) Drawing Picking ( w x2 , w y2 ) Window: x : client facilitates ( w x1 , w y1 )

Slide 41

Implementation sample Suppose, essential library bolsters two capacities: MoveTo(x, y: number); LineTo(x, y: whole number); x and y in pixels. How to make life less demanding?

Slide 42

State variables Define state variables: Viewport: array[ 1.. 2 , 1.. 2] of number; Window: array:[ 1.. 2 , 1.. 2] of genuine; Mwv, Mobject: array[ 1.. 3 , 1.. 3] of genuine; Mwv: change from world to see Mobject: additional item change

Slide 43

Procedures Define coordinate framework: SetViewPort(x1, x2, y1, y2): Update Viewport and Mwv SetWindow(x1, x2, y1, y2): Update Window and Mwv

Slide 44

Procedures (proceeded with) Define object change: ResetTrans: Mobject := IdentityMatrix Translate(tx, ty): Mobject := T(tx,ty)* Mobject Rotate(alpha): Mobject := R(tx,ty)* Mobject Scale(sx, sy): Mobject := S(sx, sy)* Mobject

Slide 45

Procedures (kept) Handling progressive models: PushMatrix(); Push an article change on a stack; PopMatrix() Pop an article change from the stack. Then again: GetMatrix(M); SetMatrix(M);

Slide 46

Procedures (kept) Drawing methods: MyMoveTo(x, y): (x’, y’) = Mwv*Mobject*(x,y); MoveTo(x’, y’) MyLineTo(x,y): (x’, y’) = Mwv*Mobject*(x,y); LineTo(x’, y’)

Slide 47

Application DrawUnitSquare: MyMoveTo(0, 0); MyLineTo(1, 0); MyLineTo(1, 1); MyLineTo(0, 1); MyLineTo(0, 0); Initialize: SetViewPort(0, 100, 0, 100); SetWindow(0, 1, 0, 1); Main project: Initialize; Translate(- 0.5, - 0.5); for i := 1 to 10 do start Rotate(pi/20); Scale(0.9, 0.9); DrawUnitSquare; end;

Slide 48

Puzzles Modify the window/viewport change for a presentation y-hub directing downwards. How to keep up perspective proportion world->view? Which state variables? Characterize a change that changes a unit square into a “wybertje”, based on the root with width w and tallness h .

Slide 49

Geometry Dot item, determinant Representations Line Ellipse Polygon

Slide 50

Good and awful Good: symmetric in x and y Good: frameworks, vectors Bad: y = f(x) Good: dab item, determinant Bad: arcsin, arccos

Slide 51

Dot item w q v |w| cos q

Slide 52

Dot item properties

Slide 53

Determinant w q v q w Det ( v , w ): marked region of parallellogram Det ( v , w ) = 0 iff v and w are parallel

Slide 54

Curve representations Parametric: x ( t ) = ( x ( t ), y ( t )) Implicit: f( x )

Recommended
View more...