SlideShare uma empresa Scribd logo
1 de 61
2D Viewing 고려대학교 컴퓨터 그래픽스 연구실
Contents ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Projection Coordinates 2D Device Coordinates 2D Device Coordinates
3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Projection Coordinates 2D Device Coordinates 2D Device Coordinates
2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives  residing outside window Transform the clipped primitives  from screen to image coordinates Fill pixel representing primitives  in screen coordinates 2D Primitives
2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives  residing outside window Transform the clipped primitives  from screen to image coordinates Fill pixel representing primitives  in screen coordinates 2D Primitives
Clipping ,[object Object],[object Object],[object Object],World Coordinates
Clipping ,[object Object],[object Object],[object Object]
Clipping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Point Clipping  ,[object Object],(x, y) wx2 wx1 wy1 wy2 Inside = (x>=wx1) && (x<=wx2) && (y>=wy1) && (y<=wy2);
Line Clipping ,[object Object],P 7 P 8 P 10 P 9 P 1 P 2 P 5 P 4 P 3 P 6 Before Clipping
Line Clipping ,[object Object],After Clipping P 4 P 3 P 6 P’ 8 P’ 7 P’ 5
Cohen-Sutherland Line Clipping ,[object Object],P 7 P 8 P 10 P 9 P 1 P 2 P 5 P 4 P 3 P 6
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 5 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 P 1 P 2 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 5 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 P 1 P 2 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 5 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 5 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 5 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 7 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 P 8 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 P 9 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8
Cohen-Sutherland Line Clipping ,[object Object],P 10 P 6 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8 P’ 9
Cohen-Sutherland Line Clipping ,[object Object],P 6 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8 P 10 P’ 9
Cohen-Sutherland Line Clipping ,[object Object],P 6 0001 0101 0100 0110 0010 0000 1010 1000 1001 P 4 P 3 Bit 4 Bit 3 Bit 2 Bit 1 P’ 5 P’ 7 P’ 8
Polygon Clipping ,[object Object],Before Clipping
Polygon Clipping ,[object Object],After Clipping
Sutherland-Hodgeman Polygon Clipping ,[object Object]
Sutherland-Hodgeman Polygon Clipping ,[object Object]
Sutherland-Hodgeman Polygon Clipping ,[object Object]
Sutherland-Hodgeman Polygon Clipping ,[object Object]
Sutherland-Hodgeman Polygon Clipping ,[object Object]
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary P’
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary P’
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary P’
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 P 3 P 4 P 5 Inside Outside Window  Boundary P’ P”
Clipping to a Boundary ,[object Object],[object Object],P 1 P 2 Inside Outside Window  Boundary P’ P”
2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives  residing outside window Transform the clipped primitives  from screen to image coordinates Fill pixel representing primitives  in screen coordinates 2D Primitives
Viewport Transformation ,[object Object],Screen Image Viewport
Window vs. Viewport ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Viewport Transformation ,[object Object],(wx, wy) wx2 wx1 wy1 wy2 (vx, vy) vx2 vx1 vy1 vy2 Window Viewport Screen Coordinates Image Coordinates vx = vx1 + (wx – wx1) * (vx2 – vx1) / (wx2 – wx1); vy = vy1 + (wy – wy1) * (vy2 – vy1) / (wy2 – wy1);
2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives  residing outside window Transform the clipped primitives  from screen to image coordinates Fill pixel representing primitives  in screen coordinates 2D Primitives
Scan Conversion ,[object Object],[object Object],[object Object],[object Object],P 1 P 2 P 3
Triangle Scan Conversion ,[object Object],[object Object],[object Object],[object Object],L 1 L 2 L 3 P
Triangle Scan Conversion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],dx dy
Polygon Scan Conversion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inside Polygon Rule ,[object Object],[object Object],Convex Polygon Concave Polygon L 1 L 2 L 3 L 4 L 5 L 1 L 2 L 3 L 4 L 5A L 5B
Inside Polygon Rule ,[object Object],[object Object],Concave Self-Intersecting With Holes
Polygon Scan Conversion ,[object Object],[object Object],Triangle Polygon
Polygon Scan Conversion ,[object Object],[object Object]
Summary of Transformation P(x, y, z) Viewing  Transformation Projection  Transformation Window-to-Viewport  Transformation P(x, y) Modeling  Transformation 3D Object Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates

Mais conteúdo relacionado

Semelhante a 05viewing2d

Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clippingavelraj
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics Barani Tharan
 
ingraph: Live Queries on Graphs
ingraph: Live Queries on Graphs ingraph: Live Queries on Graphs
ingraph: Live Queries on Graphs Neo4j
 
Incremental Graph Queries for Cypher
Incremental Graph Queries for CypherIncremental Graph Queries for Cypher
Incremental Graph Queries for CypheropenCypher
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLahiru Danushka
 
Materi_05_CG_2223_2_.pdf
Materi_05_CG_2223_2_.pdfMateri_05_CG_2223_2_.pdf
Materi_05_CG_2223_2_.pdfichsan6
 
Giuliano david bozzo moncada
Giuliano david bozzo moncadaGiuliano david bozzo moncada
Giuliano david bozzo moncadagiuliano45
 
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...confluent
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingAnkit Garg
 
Scheme logic implement pwr plant cntrl
Scheme logic implement pwr plant cntrlScheme logic implement pwr plant cntrl
Scheme logic implement pwr plant cntrlmichaeljmack
 

Semelhante a 05viewing2d (20)

Chapter4.pdf
Chapter4.pdfChapter4.pdf
Chapter4.pdf
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
 
Clipping
ClippingClipping
Clipping
 
Clipping2
Clipping2Clipping2
Clipping2
 
Clipping in Computer Graphics
Clipping in Computer Graphics Clipping in Computer Graphics
Clipping in Computer Graphics
 
lecture8 clipping
lecture8 clippinglecture8 clipping
lecture8 clipping
 
ingraph: Live Queries on Graphs
ingraph: Live Queries on Graphs ingraph: Live Queries on Graphs
ingraph: Live Queries on Graphs
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 
Clipping 22
Clipping 22Clipping 22
Clipping 22
 
Clipping
ClippingClipping
Clipping
 
Incremental Graph Queries for Cypher
Incremental Graph Queries for CypherIncremental Graph Queries for Cypher
Incremental Graph Queries for Cypher
 
ohu.pptx
ohu.pptxohu.pptx
ohu.pptx
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Materi_05_CG_2223_2_.pdf
Materi_05_CG_2223_2_.pdfMateri_05_CG_2223_2_.pdf
Materi_05_CG_2223_2_.pdf
 
Giuliano david bozzo moncada
Giuliano david bozzo moncadaGiuliano david bozzo moncada
Giuliano david bozzo moncada
 
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...
Exactly Once Semantics Revisited (Jason Gustafson, Confluent) Kafka Summit NY...
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Scheme logic implement pwr plant cntrl
Scheme logic implement pwr plant cntrlScheme logic implement pwr plant cntrl
Scheme logic implement pwr plant cntrl
 
Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
 
hgfcgf.pptx
hgfcgf.pptxhgfcgf.pptx
hgfcgf.pptx
 

Mais de Ketan Jani

Graphics pipeline
Graphics pipelineGraphics pipeline
Graphics pipelineKetan Jani
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsKetan Jani
 
04transformation2d
04transformation2d04transformation2d
04transformation2dKetan Jani
 
02mathematics 1
02mathematics 102mathematics 1
02mathematics 1Ketan Jani
 

Mais de Ketan Jani (10)

08viewing3d
08viewing3d08viewing3d
08viewing3d
 
Shading
ShadingShading
Shading
 
Graphics pipeline
Graphics pipelineGraphics pipeline
Graphics pipeline
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Curves
CurvesCurves
Curves
 
07object3d
07object3d07object3d
07object3d
 
06 clipping
06 clipping06 clipping
06 clipping
 
04transformation2d
04transformation2d04transformation2d
04transformation2d
 
03raster
03raster03raster
03raster
 
02mathematics 1
02mathematics 102mathematics 1
02mathematics 1
 

05viewing2d

  • 1. 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실
  • 2.
  • 3. 3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Projection Coordinates 2D Device Coordinates 2D Device Coordinates
  • 4. 3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Projection Coordinates 2D Device Coordinates 2D Device Coordinates
  • 5. 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives
  • 6. 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives
  • 49.
  • 50.
  • 51.
  • 52. 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61. Summary of Transformation P(x, y, z) Viewing Transformation Projection Transformation Window-to-Viewport Transformation P(x, y) Modeling Transformation 3D Object Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates