2M050: Computer Graphics Jack van Wijk firstname.lastname@example.org HG6.71Slide 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 HallSlide 4
Overview Introduction Geometry Interaction Raster representationSlide 5
Introduction What is Computer Graphics? Applications Computer Graphics in Eindhoven Raster/vector representation HardwareSlide 6
Computer Graphics Computer Graphics is pervasive: Visual framework is most vital sense: High transfer speed Natural correspondence Fast improvements in Hardware SoftwareSlide 7
Computer Graphics Image Analysis (design acknowledgment) Mathematical Model Image Synthesis (Rendering) Modeling Image preparingSlide 8
Supporting Disciplines Computer science (calculations, information structures, programming building, â¦) Mathematics (geometry, numerical, â¦) Physics (Optics, mechanics, â¦) Psychology (Color, recognition) Art and outlineSlide 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 WeteringSlide 11
Interactive Computer Graphics User data Application Screen pictureSlide 12
Model Geometry, shading Graphics pipeline User Edit Map Screen DisplaySlide 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 squaresSlide 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 representationSlide 17
Hardware Vector illustrations Raster representation Color lookup table 3D rendering equipmentSlide 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 ControllerSlide 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 planesSlide 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,BSlide 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, antialiasingSlide 22
2D geometric demonstrating Coordinates Transformations Parametric and certain representations AlgorithmsSlide 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 xSlide 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 xSlide 25
Coordinate frameworks world train wheel pictureSlide 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 xSlide 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 itSlide 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 = 0Slide 30
Matrices for changeSlide 31
Direct elucidation yâ ( x, y ) y ( xâ,yâ ) x b a t xâSlide 32
Translation networkSlide 33
Scaling frameworkSlide 34
Rotation gridSlide 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-1Slide 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 ) CSlide 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 changeSlide 43
Procedures Define coordinate framework: SetViewPort(x1, x2, y1, y2): Update Viewport and Mwv SetWindow(x1, x2, y1, y2): Update Window and MwvSlide 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)* MobjectSlide 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 PolygonSlide 50
Good and awful Good: symmetric in x and y Good: frameworks, vectors Bad: y = f(x) Good: dab item, determinant Bad: arcsin, arccosSlide 51
Dot item w q v |w| cos qSlide 52
Dot item propertiesSlide 53
Determinant w q v q w Det ( v , w ): marked region of parallellogram Det ( v , w ) = 0 iff v and w are parallelSlide 54
Curve representations Parametric: x ( t ) = ( x ( t ), y ( t )) Implicit: f( x )
Address 03 Diagram of PC Representation Programming. CSC4820/6820 PC Design Calculations Ying Zh ...
Prologue to Design Equipment and GPUs Yannick Francken Tom Mertens Outline Definition Inspiratio ...
Design and Still Pictures John H. Krantz Hanover School Layout Representation Sorts Creating wit ...
Dynamic Design – Transforming Insights Into Information Lars Thygesen MSIS 2007 Diagram Why ar ...
Prologue to 2D/3D Design Advancement with OpenGL ES on the Beagle Board Mud D. Montgomery, Repre ...
Web Representation. Scratch Foxall. Illustrations on PCs. Any picture showed on a PC screen* is ...
CSC 308 – Representation Programming Say Howdy to Illustrations i.e.: An initially, straightf ...
Illustrations and Pictures September 28, Unit 3 PC Design "PC representation alludes to utilizin ...
PC Representation Arranged by Mythical beast Lee 1 January 2003 Utilization of PC Illustrations ...
Section 14 Working with Design Beginning In this Part, you will learn: About various representat ...
What is PC Design? Targets In this address, we investigate what PC illustrations is about We wil ...
Grouping of cutting edge illustrations courses at UVA: CS 447: Image Synthesis (Greg Humphreys) ...
Otherwise known as Video cards, Video sheets, Video showcase sheets, Graphics sheets, Graphics . ...
Chronicled Past of Game Development. PacMan. Magnificent Joystick Input!!! SoundFX Simple .. ...
For instance, after unique rendering, a line has width! The ... Pipeline: Abstract Rendering. CS ...
Prologue to helpful design Essential thoughts -Direction frameworks -Representation seeing pip ...
PC representation alludes to any photos or charts created utilizing a PC. Drawing and Design Pac ...
PC illustrations alludes to any photos or charts delivered utilizing a PC. Drawing and Design Pa ...
Treefrog and Dragonfly. Jason Pierce. Blender Render. The Dawn of the ... You can clicking so as ...