SlideShare a Scribd company logo
1 of 27
Representing
Geometry in Computer
Graphics
Rick Skarbez, Instructor
COMP 575
September 18, 2007
Adam Powers
Richard Taylor
Information International, Inc. (III), 1981
Announcements
• Programming Assignment 1 is out today
• Due next Thursday by 11:59pm
• ACM Programming Contest
ACM Programming
Contest
• First regional competition (at Duke) is
Oct 27
• Top teams at regionals get a free trip to
worlds
• This year, in scenic Alberta Canada
• First meeting is this Thursday (09/20) at
7pm in 011
• All are welcome!
• Introduced the basics of OpenGL
• Did an interactive demo of creating an
OpenGL/GLUT program
Last Time
Today
• Review of Homework 1
• Discussion and demo of Programming
Assignment 1
• Discussion of geometric
representations for computer graphics
Homework 1
• Noticed 2 recurring problems
• Normalized vs. Unnormalized points and
vectors
• Matrix Multiplication
Points and Vectors in
Homogeneous
Coordinates
• To represent a point or vector in n-D,
we use an (n+1)-D (math) vector
• Add a ‘w’ term
• We do this so that transforms can be
represented with a single matrix
Points and Vectors in
Homogeneous
Coordinates
• Vectors (geometric) represent only
direction and magnitude
• They do not have a location, so they cannot
be affected by translation
• Therefore, for vectors, w = 0
• Points have a location, and so are
affected by translations
• Therefore, for points, w != 0
Points and Vectors in
Homogeneous
Coordinates
• A “normalized” point in homogeneous
coordinates is a point with w = 1
• Can normalize a point by dividing all terms
by w:
Points and Vectors in
Homogeneous
Coordinates
• A “normalized” vector is a vector with
magnitude = 1
• Can normalize a vector by dividing all terms
by the vector magnitude = sqrt(x^2 + y^2 +
z^2) (in 3-D)
Matrix Multiplication
• Only well defined if the number of
columns of the first matrix and the
number of rows of the second matrix
are the same
• Matrix * Matrix = Matrix
• i.e. if F is m x n, and
G is n x p, then FG
if m x p
Programming
Assignment 1
• Demo
Geometric
Representations in
Computer Graphics
• There are 2 most common ways of
representing objects in computer
graphics
• As procedures
• i.e. splines, constructive solid geometry
• As tessellated polygons
• i.e. a whole bunch of triangles
Analytic
Representations
• Advantages:
• Can be as precise as you want
• That is, can compute as many points on
the function as you want when rendering
• Derivatives, gradients, etc. are directly
available
• Continuous and smooth
• Easy to make sure there are no holes
Analytic
Representations
• Disadvantages:
• Not generalizable
• Therefore, SLOW!
• Often complicated
Tessellated Polygons
• Advantages:
• Very predictable
• Just pass in a list of vertices
• Therefore, can be made VERY FAST
Tessellated Polygons
• Disdvantages:
• Only know what the surface looks like at the
vertices
• Derivatives, gradients, etc. are not smooth
across polygons
• Can have holes
Analytic
Representations
• Probably the most obvious way to use
analytic representations is to just
represent simple objects as functions
• Planes: ax + by + cz +d = 0
• Spheres: (x - xo)2 + (y - yo)2 + (z - zo)2 = r2
• etc.
• We’ll do this when we’re ray-tracing
Analytic
Representations
• There are many more procedural
methods for generating curves and
surfaces
• Bézier curves
• B-Splines
• Non-rational Uniform B-Splines (NURBS)
• Subdivision surfaces
• etc.
• We may cover some of these later on
Computer-Aided
Design
• An application where analytic
representations are commonly used is
Computer-Aided Design (CAD)
• Why?
• Accuracy is very important
• Speed is not that important
Solid Modeling
• Another reason analytic models are
often used in CAD is that they can
directly represent solids
• The sign of a function can determine
whether a point is inside or outside of an
object
Constructive Solid
Geometry (CSG)
• A method for constructing solid objects
from Boolean combinations of solid
primitives
• Operators: union, difference, intersection
• Primitives: spheres, cones, cylinders,
cuboids, etc.
Union Difference Intersection
Why Triangles?
• So, why are triangles the primitives of
choice, and not squares, or septagons?
• Simplest polygon (only 3 sides)
• Therefore smallest representation
• Guaranteed to be convex
• Easy to compute barycentric coordinates
Barycentric
Coordinates
• Every triangle defines a (possibly) non-
orthogonal coordinate system
• Let a, b, and c be the vertices of the triangle
• Arbitrarily choose a as the origin of our new
coordinate system
• Now any point p can be represented
p = a + β(b - a) + γ(c - a)
or, with α = 1 - β - γ, as
p = αa + βb + γc
Barycentric
Coordinates
• Why are these so great?
• Easy to tell if a point is inside the triangle
• A point is inside the triangle if and only if
α, β, and γ are all between 0 and 1
• Interpolation is very easy
• Needed for shading
Next Time
• Beginning our discussion of lighting
and shading

More Related Content

Similar to september18.ppt

Algorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model RecoveryAlgorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model RecoveryCurvSurf
 
Surface models
Surface modelsSurface models
Surface modelsnmahi96
 
5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdfKeerthanaP37
 
Programming in python
Programming in pythonProgramming in python
Programming in pythonIvan Rojas
 
187186134 5-geometric-modeling
187186134 5-geometric-modeling187186134 5-geometric-modeling
187186134 5-geometric-modelingmanojg1990
 
187186134 5-geometric-modeling
187186134 5-geometric-modeling187186134 5-geometric-modeling
187186134 5-geometric-modelingmanojg1990
 
5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoria5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoriaRaghu Gadde
 
Geoscience For Gis A
Geoscience For Gis AGeoscience For Gis A
Geoscience For Gis AAndrew Zolnai
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblasMIT
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblasgraphulo
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringMachine Learning Valencia
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-onlinelifebreath
 
ODSC India 2018: Topological space creation & Clustering at BigData scale
ODSC India 2018: Topological space creation & Clustering at BigData scaleODSC India 2018: Topological space creation & Clustering at BigData scale
ODSC India 2018: Topological space creation & Clustering at BigData scaleKuldeep Jiwani
 
affine transformation for computer graphics
affine transformation for computer graphicsaffine transformation for computer graphics
affine transformation for computer graphicsDrSUGANYADEVIK
 
5_6221983039971394498.pptx
5_6221983039971394498.pptx5_6221983039971394498.pptx
5_6221983039971394498.pptxNachiketKadlag1
 

Similar to september18.ppt (20)

Algorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model RecoveryAlgorithmic Techniques for Parametric Model Recovery
Algorithmic Techniques for Parametric Model Recovery
 
Surface models
Surface modelsSurface models
Surface models
 
PPT s07-machine vision-s2
PPT s07-machine vision-s2PPT s07-machine vision-s2
PPT s07-machine vision-s2
 
Floor planning ppt
Floor planning pptFloor planning ppt
Floor planning ppt
 
5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf
 
Programming in python
Programming in pythonProgramming in python
Programming in python
 
august23.ppt
august23.pptaugust23.ppt
august23.ppt
 
Introduction to solid modeling
Introduction to solid modelingIntroduction to solid modeling
Introduction to solid modeling
 
187186134 5-geometric-modeling
187186134 5-geometric-modeling187186134 5-geometric-modeling
187186134 5-geometric-modeling
 
187186134 5-geometric-modeling
187186134 5-geometric-modeling187186134 5-geometric-modeling
187186134 5-geometric-modeling
 
5 geometric modeling
5 geometric modeling5 geometric modeling
5 geometric modeling
 
5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoria5 geometric-modeling-ppt-university-of-victoria
5 geometric-modeling-ppt-university-of-victoria
 
Geoscience For Gis A
Geoscience For Gis AGeoscience For Gis A
Geoscience For Gis A
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblas
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblas
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature Engineering
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-online
 
ODSC India 2018: Topological space creation & Clustering at BigData scale
ODSC India 2018: Topological space creation & Clustering at BigData scaleODSC India 2018: Topological space creation & Clustering at BigData scale
ODSC India 2018: Topological space creation & Clustering at BigData scale
 
affine transformation for computer graphics
affine transformation for computer graphicsaffine transformation for computer graphics
affine transformation for computer graphics
 
5_6221983039971394498.pptx
5_6221983039971394498.pptx5_6221983039971394498.pptx
5_6221983039971394498.pptx
 

More from CharlesMatu2

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...CharlesMatu2
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.pptCharlesMatu2
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.pptCharlesMatu2
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.pptCharlesMatu2
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptCharlesMatu2
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxCharlesMatu2
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docxCharlesMatu2
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxCharlesMatu2
 

More from CharlesMatu2 (17)

The cause of ww1 happened 1914 this was after the the asssasination of Arc...
The  cause of ww1  happened  1914 this was after the the asssasination of Arc...The  cause of ww1  happened  1914 this was after the the asssasination of Arc...
The cause of ww1 happened 1914 this was after the the asssasination of Arc...
 
AP Ch 1.ppt
AP Ch 1.pptAP Ch 1.ppt
AP Ch 1.ppt
 
history_of_american_agriculture.ppt
history_of_american_agriculture.ppthistory_of_american_agriculture.ppt
history_of_american_agriculture.ppt
 
Origin of Agriculture.ppt
Origin of Agriculture.pptOrigin of Agriculture.ppt
Origin of Agriculture.ppt
 
History of Science and Technology.ppt
History of Science and Technology.pptHistory of Science and Technology.ppt
History of Science and Technology.ppt
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
 
september13.ppt
september13.pptseptember13.ppt
september13.ppt
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
 
september6.ppt
september6.pptseptember6.ppt
september6.ppt
 
november6.ppt
november6.pptnovember6.ppt
november6.ppt
 
november29.ppt
november29.pptnovember29.ppt
november29.ppt
 
october9.ppt
october9.pptoctober9.ppt
october9.ppt
 
october23.ppt
october23.pptoctober23.ppt
october23.ppt
 
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.pptLighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
 
BBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docxBBM3117 CAT 31ST.docx
BBM3117 CAT 31ST.docx
 
Computer graphics.docx
Computer graphics.docxComputer graphics.docx
Computer graphics.docx
 
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docxBIT4103 HUMAN COMPUTER INTERACTION CAT.docx
BIT4103 HUMAN COMPUTER INTERACTION CAT.docx
 

Recently uploaded

꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂Hot Call Girls In Sector 58 (Noida)
 
BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024AHOhOops1
 
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...Hot Call Girls In Sector 58 (Noida)
 
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一hnfusn
 
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...shivangimorya083
 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Niya Khan
 
The 10th anniversary, Hyundai World Rally Team's amazing journey
The 10th anniversary, Hyundai World Rally Team's amazing journeyThe 10th anniversary, Hyundai World Rally Team's amazing journey
The 10th anniversary, Hyundai World Rally Team's amazing journeyHyundai Motor Group
 
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERUNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERunosafeads
 
Not Sure About VW EGR Valve Health Look For These Symptoms
Not Sure About VW EGR Valve Health Look For These SymptomsNot Sure About VW EGR Valve Health Look For These Symptoms
Not Sure About VW EGR Valve Health Look For These SymptomsFifth Gear Automotive
 
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...Hot Call Girls In Sector 58 (Noida)
 
FULL ENJOY - 9953040155 Call Girls in Sector 61 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 61 | NoidaFULL ENJOY - 9953040155 Call Girls in Sector 61 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 61 | NoidaMalviyaNagarCallGirl
 
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESUNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESDineshKumar4165
 
call girls in G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid
2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid
2024 WRC Hyundai World Rally Team’s i20 N Rally1 HybridHyundai Motor Group
 
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...shivangimorya083
 
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCRsoniya singh
 
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxDineshKumar4165
 
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptUNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptDineshKumar4165
 

Recently uploaded (20)

꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
 
BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024BLUE VEHICLES the kids picture show 2024
BLUE VEHICLES the kids picture show 2024
 
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...
(COD) ̄Young Call Girls In Dwarka , New Delhi꧁❤ 7042364481❤꧂ Escorts Service i...
 
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
 
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...
Hot And Sexy 🥵 Call Girls Delhi Daryaganj {9711199171} Ira Malik High class G...
 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
 
The 10th anniversary, Hyundai World Rally Team's amazing journey
The 10th anniversary, Hyundai World Rally Team's amazing journeyThe 10th anniversary, Hyundai World Rally Team's amazing journey
The 10th anniversary, Hyundai World Rally Team's amazing journey
 
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERUNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
 
Not Sure About VW EGR Valve Health Look For These Symptoms
Not Sure About VW EGR Valve Health Look For These SymptomsNot Sure About VW EGR Valve Health Look For These Symptoms
Not Sure About VW EGR Valve Health Look For These Symptoms
 
sauth delhi call girls in Connaught Place🔝 9953056974 🔝 escort Service
sauth delhi call girls in  Connaught Place🔝 9953056974 🔝 escort Servicesauth delhi call girls in  Connaught Place🔝 9953056974 🔝 escort Service
sauth delhi call girls in Connaught Place🔝 9953056974 🔝 escort Service
 
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...
꧁ ୨⎯Call Girls In Ashok Vihar, New Delhi **✿❀7042364481❀✿**Escorts ServiCes C...
 
FULL ENJOY - 9953040155 Call Girls in Sector 61 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 61 | NoidaFULL ENJOY - 9953040155 Call Girls in Sector 61 | Noida
FULL ENJOY - 9953040155 Call Girls in Sector 61 | Noida
 
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLESUNIT-III-TRANSMISSION SYSTEMS REAR AXLES
UNIT-III-TRANSMISSION SYSTEMS REAR AXLES
 
call girls in G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in G.T.B. Nagar (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid
2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid
2024 WRC Hyundai World Rally Team’s i20 N Rally1 Hybrid
 
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
 
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Shaheen Bagh 🔝 Delhi NCR
 
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Jama Masjid (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
 
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptUNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
 

september18.ppt

  • 1. Representing Geometry in Computer Graphics Rick Skarbez, Instructor COMP 575 September 18, 2007
  • 2. Adam Powers Richard Taylor Information International, Inc. (III), 1981
  • 3. Announcements • Programming Assignment 1 is out today • Due next Thursday by 11:59pm • ACM Programming Contest
  • 4. ACM Programming Contest • First regional competition (at Duke) is Oct 27 • Top teams at regionals get a free trip to worlds • This year, in scenic Alberta Canada • First meeting is this Thursday (09/20) at 7pm in 011 • All are welcome!
  • 5. • Introduced the basics of OpenGL • Did an interactive demo of creating an OpenGL/GLUT program Last Time
  • 6. Today • Review of Homework 1 • Discussion and demo of Programming Assignment 1 • Discussion of geometric representations for computer graphics
  • 7. Homework 1 • Noticed 2 recurring problems • Normalized vs. Unnormalized points and vectors • Matrix Multiplication
  • 8. Points and Vectors in Homogeneous Coordinates • To represent a point or vector in n-D, we use an (n+1)-D (math) vector • Add a ‘w’ term • We do this so that transforms can be represented with a single matrix
  • 9. Points and Vectors in Homogeneous Coordinates • Vectors (geometric) represent only direction and magnitude • They do not have a location, so they cannot be affected by translation • Therefore, for vectors, w = 0 • Points have a location, and so are affected by translations • Therefore, for points, w != 0
  • 10. Points and Vectors in Homogeneous Coordinates • A “normalized” point in homogeneous coordinates is a point with w = 1 • Can normalize a point by dividing all terms by w:
  • 11. Points and Vectors in Homogeneous Coordinates • A “normalized” vector is a vector with magnitude = 1 • Can normalize a vector by dividing all terms by the vector magnitude = sqrt(x^2 + y^2 + z^2) (in 3-D)
  • 12. Matrix Multiplication • Only well defined if the number of columns of the first matrix and the number of rows of the second matrix are the same • Matrix * Matrix = Matrix • i.e. if F is m x n, and G is n x p, then FG if m x p
  • 14. Geometric Representations in Computer Graphics • There are 2 most common ways of representing objects in computer graphics • As procedures • i.e. splines, constructive solid geometry • As tessellated polygons • i.e. a whole bunch of triangles
  • 15. Analytic Representations • Advantages: • Can be as precise as you want • That is, can compute as many points on the function as you want when rendering • Derivatives, gradients, etc. are directly available • Continuous and smooth • Easy to make sure there are no holes
  • 16. Analytic Representations • Disadvantages: • Not generalizable • Therefore, SLOW! • Often complicated
  • 17. Tessellated Polygons • Advantages: • Very predictable • Just pass in a list of vertices • Therefore, can be made VERY FAST
  • 18. Tessellated Polygons • Disdvantages: • Only know what the surface looks like at the vertices • Derivatives, gradients, etc. are not smooth across polygons • Can have holes
  • 19. Analytic Representations • Probably the most obvious way to use analytic representations is to just represent simple objects as functions • Planes: ax + by + cz +d = 0 • Spheres: (x - xo)2 + (y - yo)2 + (z - zo)2 = r2 • etc. • We’ll do this when we’re ray-tracing
  • 20. Analytic Representations • There are many more procedural methods for generating curves and surfaces • Bézier curves • B-Splines • Non-rational Uniform B-Splines (NURBS) • Subdivision surfaces • etc. • We may cover some of these later on
  • 21. Computer-Aided Design • An application where analytic representations are commonly used is Computer-Aided Design (CAD) • Why? • Accuracy is very important • Speed is not that important
  • 22. Solid Modeling • Another reason analytic models are often used in CAD is that they can directly represent solids • The sign of a function can determine whether a point is inside or outside of an object
  • 23. Constructive Solid Geometry (CSG) • A method for constructing solid objects from Boolean combinations of solid primitives • Operators: union, difference, intersection • Primitives: spheres, cones, cylinders, cuboids, etc. Union Difference Intersection
  • 24. Why Triangles? • So, why are triangles the primitives of choice, and not squares, or septagons? • Simplest polygon (only 3 sides) • Therefore smallest representation • Guaranteed to be convex • Easy to compute barycentric coordinates
  • 25. Barycentric Coordinates • Every triangle defines a (possibly) non- orthogonal coordinate system • Let a, b, and c be the vertices of the triangle • Arbitrarily choose a as the origin of our new coordinate system • Now any point p can be represented p = a + β(b - a) + γ(c - a) or, with α = 1 - β - γ, as p = αa + βb + γc
  • 26. Barycentric Coordinates • Why are these so great? • Easy to tell if a point is inside the triangle • A point is inside the triangle if and only if α, β, and γ are all between 0 and 1 • Interpolation is very easy • Needed for shading
  • 27. Next Time • Beginning our discussion of lighting and shading