SlideShare a Scribd company logo
1 of 42
11
Computer GraphicsComputer Graphics
Chapter 7Chapter 7
3D Object Modeling3D Object Modeling
2
3D Object Representation3D Object Representation
 A surface can be analyticallyA surface can be analytically
generated using its functiongenerated using its function
involving the coordinates.involving the coordinates.
 An object can be represented inAn object can be represented in
terms of its vertices, edges andterms of its vertices, edges and
polygons. (Wire Frame,polygons. (Wire Frame,
Polygonal Mesh etc.)Polygonal Mesh etc.)
 Curves and surfaces can also beCurves and surfaces can also be
designed using splines bydesigned using splines by
specifying a set of few controlspecifying a set of few control
points.points.
y = f(x,z)
x y z . . .
3
Solid Modeling - PolyhedronSolid Modeling - Polyhedron
 A polyhedron is a connected mesh of simple planarA polyhedron is a connected mesh of simple planar
polygons that encloses a finite amount of space.polygons that encloses a finite amount of space.
 A polyhedron is a special case of a polygon mesh thatA polyhedron is a special case of a polygon mesh that
satisfies the following properties:satisfies the following properties:
 Every edge is shared by exactly two faces.Every edge is shared by exactly two faces.
 At least three edges meet at each vertex.At least three edges meet at each vertex.
 Faces do not interpenetrate. Faces at most touchFaces do not interpenetrate. Faces at most touch
along a common edge.along a common edge.
 Euler’s formulaEuler’s formula : If: If FF,, EE,, VV represent the number ofrepresent the number of
faces, vertices and edges of a polyhedron, thenfaces, vertices and edges of a polyhedron, then
VV ++ FF −− EE = 2.= 2.
4
3D Object Representation3D Object Representation
 The data for polygonal meshesThe data for polygonal meshes
can be represented in two ways.can be represented in two ways.
 Method 1:Method 1:
 Vertex ListVertex List
 Normal ListNormal List
 Face List (Polygon List)Face List (Polygon List)
 Method 2:Method 2:
 Vertex ListVertex List
 Edge ListEdge List
 Face List (Polygon List)Face List (Polygon List)
5
01
2 3
45
6
7
Vertices and Faces - E.g. CubeVertices and Faces - E.g. Cube
0
1
2
3
4
5
Face Index
Vertex Index
6
Data representation using vertex, face and normal lists:
Vertex List Normal List Polygon List
30 30 30 0.0 0.0 1.0 0 1 2 3
-30 30 30 0.0 0.0 -1.0 4 7 6 5
-30 -30 30 0.0 1.0 0.0 0 4 5 1
30 -30 30 -1.0 0.0 0.0 1 5 6 2
30 30 -30 0.0 -1.0 0.0 2 6 7 3
-30 30 -30 1.0 0.0 0.0 3 7 4 0
-30 -30 -30
30 -30 -30
7
Vertex List Edge List Polygon List
x[i] y[i] z[i] L[j] M[j] P[k] Q[k] R[k] S[k]
30 30 30 0 1 0 1 2 3
-30 30 30 1 2 4 7 6 5
-30 -30 30 2 3 0 4 5 1
30 -30 30 3 0 1 5 6 2
30 30 -30 4 5 2 6 7 3
-30 30 -30 5 6 3 7 4 0
-30 -30 -30 6 7
30 -30 -30 7 4
0 4
1 5
2 6
3 7
Data representation using vertex, face and edge lists:
8
Normal Vectors (OpenGL)Normal Vectors (OpenGL)
Assigning a normal vector to a polygon:
glBegin(GL_POLYGON);
glNormal3f(xn,yn,zn);
glVertex3f(x1,y1,z1);
glVertex3f(x2,y2,z2);
glVertex3f(x3,y3,z3);
glVertex3f(x4,y4,z4);
glEnd();
Enabling automatic conversion of normal vectors to unit vectors:
glEnable(GL_NORMALIZE);
9
Regular Polyhedra (Regular Polyhedra (Platonic Solids)Platonic Solids)
 If all the faces of a polyhedron areIf all the faces of a polyhedron are
identical, and each is a regular polygon,identical, and each is a regular polygon,
then the object is called athen the object is called a platonic solidplatonic solid..
 Only five such objects exist.Only five such objects exist.
10
Wire-Frame ModelsWire-Frame Models
 If the object is defined only by a set of nodesIf the object is defined only by a set of nodes
(vertices), and a set of lines connecting the(vertices), and a set of lines connecting the
nodes, then the resulting objectnodes, then the resulting object
representation is called a wire-frame model.representation is called a wire-frame model.
 Very suitable for engineeringVery suitable for engineering
applications.applications.
 Simplest 3D Model - easy to construct.Simplest 3D Model - easy to construct.
 Easy to clip and manipulate.Easy to clip and manipulate.
 Not suitable for building realistic models.Not suitable for building realistic models.
11
Wire Frame Models - OpenGLWire Frame Models - OpenGL
Some Wireframe Models in OpenGL:
Cube: glutWireCube(Gldouble size);
Sphere: glutWireSphere(…);
Torus: glutWireTorus(…);
Teapot: glutWireTeapot(Gldouble size);
Cone: glutWireCone(…);
(…) Refer text for list of arguments.
12
Wire Frame Model - TheWire Frame Model - The
TeapotTeapot
13
Polygonal MeshPolygonal Mesh
 Three-dimensional surfaces and solids can beThree-dimensional surfaces and solids can be
approximated by a set of polygonal and lineapproximated by a set of polygonal and line
elements. Such surfaces are calledelements. Such surfaces are called polygonalpolygonal
meshes.meshes.
 The set of polygons or faces, together form theThe set of polygons or faces, together form the
“skin” of the object.“skin” of the object.
 This method can be used to represent a broadThis method can be used to represent a broad
class of solids/surfaces in graphics.class of solids/surfaces in graphics.
 A polygonal mesh can be rendered using hiddenA polygonal mesh can be rendered using hidden
surface removal algorithms.surface removal algorithms.
14
Polygonal Mesh - ExamplePolygonal Mesh - Example
15
Solid ModelingSolid Modeling
 Polygonal meshes can be used in solidPolygonal meshes can be used in solid
modeling.modeling.
 An object is consideredAn object is considered solidsolid if theif the
polygons fit together to enclose a space.polygons fit together to enclose a space.
 In solid models, it is necessary toIn solid models, it is necessary to
incorporate directional information on eachincorporate directional information on each
face by using theface by using the normal vectornormal vector to theto the
plane of the face, and it is used in theplane of the face, and it is used in the
shading process.shading process.
16
Solid Modeling - ExampleSolid Modeling - Example
17
Solid Modeling - OpenGLSolid Modeling - OpenGL
Some predefined Solid Models in OpenGL:
Cube: glutSolidCube(Gldouble size);
Sphere: glutSolidSphere(…);
Torus: glutSolidTorus(…);
Teapot: glutSolidTeapot(Gldouble size);
Cone: glutSolidCone(…);
(…) Arguments same as wire-frame models.
18
Z
X
Y
y = f(x, z)
Surface ModelingSurface Modeling
Many surfaces can be represented by an explicit function of
two independent variables, such as y = f(x, z).
19
Surface Modeling - ExampleSurface Modeling - Example
20
Sweep RepresentationsSweep Representations
 Sweep representations are useful for bothSweep representations are useful for both
surface modeling and solid modeling.surface modeling and solid modeling.
 A large class of shapes (both surfaces andA large class of shapes (both surfaces and
solid models) can be formed bysolid models) can be formed by sweepingsweeping
oror extrudingextruding a 2D shape through space.a 2D shape through space.
 Sweep representations are useful forSweep representations are useful for
constructing 3-D objects that possesconstructing 3-D objects that posses
translational or rotational symmetries.translational or rotational symmetries.
21
Extruded Shapes - ExamplesExtruded Shapes - Examples
A polyhedron obtained
by sweeping (extruding)
a polygon along a
straight line is called a
prism.
22
Surface of RevolutionSurface of Revolution
 A surface of revolution is obtained byA surface of revolution is obtained by
revolving a curve (known as therevolving a curve (known as the base curvebase curve
oror profile curveprofile curve) about an axis.) about an axis.
 In other words, a surface of revolution isIn other words, a surface of revolution is
generated by agenerated by a rotational sweeprotational sweep of a 2Dof a 2D
curve.curve.
 The symmetry of the surface of revolutionThe symmetry of the surface of revolution
makes it a very useful object inmakes it a very useful object in
presentation graphics.presentation graphics.
23
Z
X
Y
y = f(x)
r
y y
(x, z)
y = f(r)
x
22
zxr +=
Surface of RevolutionSurface of Revolution
24
The three-dimensional surface obtained by
revolving the curve y = f(x) about the y-axis is
obtained by replacing x with sqrt(x*x + z*z).
The surface of revolution is thus given by
( )y f x z= +2 2
Surface of RevolutionSurface of Revolution
25
Surface of RevolutionSurface of Revolution
x
x
y
)sin(
=
22
22
sin
zx
zx
y
+





 +
=
26
Quad treesQuad trees
Quad trees are generated by successivelyQuad trees are generated by successively
dividing a 2-D region(usually a square) intodividing a 2-D region(usually a square) into
quadrants. Each node in the quadtree hasquadrants. Each node in the quadtree has
4 data elements, one for each of the4 data elements, one for each of the
quadrants in the region. If all the pixelsquadrants in the region. If all the pixels
within a quadrant have the same color (awithin a quadrant have the same color (a
homogeneous quadrant), thehomogeneous quadrant), the
corresponding data element in the nodecorresponding data element in the node
stores that color. For a heterogeneousstores that color. For a heterogeneous
region of space, the successive divisionsregion of space, the successive divisions
into quadrants continues until all quadrantsinto quadrants continues until all quadrants
are homogeneous.are homogeneous.
27
OctreesOctrees
 An octree encoding scheme divide regions ofAn octree encoding scheme divide regions of
3-D space(usually a cube) in to octants and3-D space(usually a cube) in to octants and
stores 8 data elements in each node of thestores 8 data elements in each node of the
tree.tree.
 Individual elements of a 3-D space are calledIndividual elements of a 3-D space are called
volume elements or voxels.volume elements or voxels.
 When all voxels in an octant are of the sameWhen all voxels in an octant are of the same
type, this type value is stored in thetype, this type value is stored in the
corresponding data element of the node. Anycorresponding data element of the node. Any
heterogeneous octant is subdivided intoheterogeneous octant is subdivided into
octants and the corresponding data elementoctants and the corresponding data element
in the node points to the next node in thein the node points to the next node in the
octree.octree.
28
OctreesOctrees
29
Bezier CurvesBezier Curves
The Bezier curve only approximates the control points
and doesn’t actually pass through all of them.
30
Inputs: n control points (xi, yi), i = 0, 1,2, …n-1
( )
,
0
,
0
,
( ) ( )
( ) ( )
0 1
!
( ) (1 )
! !
m
b m i i
i
m
b m i i
i
i m i
m i
x u Bez u x
y u Bez u y
u
m m m
Bez u u u and
i i i m i
=
=
−
=
=
≤ ≤
   
= − = ÷  ÷
−   
∑
∑
m = n−1
Bezier CurvesBezier Curves
31
Inputs: n control points (xi, yi), i = 0, 1,2, …m
0
( ) ( ) , 0 1
( ) ( ( ), ( ))
( , )
m
m i i
i i
i i i
r u Bez u r u
where
r u x u y u
r x y
=
= ≤ ≤
=
=
∑% %
%
%
Bezier CurvesBezier Curves
32
Properties of Bezier CurveProperties of Bezier Curve
 Bezier curve is a polynomial ofBezier curve is a polynomial of
degree one less than thedegree one less than the
number of control pointsnumber of control points
p0
p2
p1
p0
p2
p1
p3
Quadratic Curve Cubic Curve
33
Properties of Bezier Curve (cont.)Properties of Bezier Curve (cont.)
 Bezier curve always passesBezier curve always passes
through the first and last points;through the first and last points;
i.e.i.e.
andand
0(0)x x=
,
0(0)y y=
(1) mx x= (1) my y=
34
Properties of Bezier CurveProperties of Bezier Curve
(cont)(cont)
 The slop at the beginning of the curve isThe slop at the beginning of the curve is
along the line joining the first two controlalong the line joining the first two control
points, and the slope at the end of thepoints, and the slope at the end of the
curve is along the line joining the last twocurve is along the line joining the last two
points.points.
p0
p2
p1
p0
p2
p1
35
Properties of Bezier CurveProperties of Bezier Curve
(cont)(cont)
 Bezier blending functions are all positiveBezier blending functions are all positive
and the sum is always 1.and the sum is always 1.
 This means that the curve is the weightedThis means that the curve is the weighted
sum of the control points.sum of the control points.
,
0
( ) 1
m
m i
i
Bez u
=
=∑
36
Design Technique using BezierDesign Technique using Bezier
Curves:Curves:
 A closed Bezier curve can be generated byA closed Bezier curve can be generated by
specifying the first and last control points atspecifying the first and last control points at
the same locationthe same location
p4
p0=p5
p1
p2
p3
37
Design Technique (Cont)Design Technique (Cont)
 A Bezier curve can be made to pass closerA Bezier curve can be made to pass closer
to a given coordinate position by assigningto a given coordinate position by assigning
multiple control points to that position.multiple control points to that position.
p0
p1 = p2 p3
p4
38
 Bezier curve can be form by piecing ofBezier curve can be form by piecing of
several Bezier section with lower degree.several Bezier section with lower degree.
p0
p1
p2= p’0
p’2
p’3
p’1
39
(Not Important!)
,
0 0
( , ) ( ) ( ) ,
0 1, 0 1
( , ) ( ( , ), ( , ), ( , ))
( , , )
m l
m i l j i j
i j
ij ij ij ij
r u v Bez u Bez v r
u v
where
r u v x u v y u v z u v
r x y z
= =
=
≤ ≤ ≤ ≤
=
=
∑∑% %
%
%
Bezier SurfacesBezier Surfaces
40
A set of 16 control points The Bezier Patch
Bezier PatchBezier Patch
41
Utah Teapot Defined Using Control Points
Bezier PatchBezier Patch
42
Utah Teapot Generated Using Bezier Patches
Bezier PatchBezier Patch

More Related Content

What's hot

GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsMichael Heron
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary ExtractionMaria Akther
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiTekendra Nath Yogi
 
Dilation and erosion
Dilation and erosionDilation and erosion
Dilation and erosionAswin Pv
 
Lect8 viewing in3d&transformation
Lect8 viewing in3d&transformationLect8 viewing in3d&transformation
Lect8 viewing in3d&transformationBCET
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...JinTaek Seo
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingHemantha Kulathilake
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmJyotiraman De
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingRaghu Kumar
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics FundamentalsMuhammed Afsal Villan
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsMichael Heron
 
Matrix transformation
Matrix transformationMatrix transformation
Matrix transformationmstf mstf
 
Definite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralDefinite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralShaifulIslam56
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingMark Kilgard
 

What's hot (20)

GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D Graphics
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
 
Dilation and erosion
Dilation and erosionDilation and erosion
Dilation and erosion
 
Lect8 viewing in3d&transformation
Lect8 viewing in3d&transformationLect8 viewing in3d&transformation
Lect8 viewing in3d&transformation
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
Computer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal AlgorithmComputer Graphics - Hidden Line Removal Algorithm
Computer Graphics - Hidden Line Removal Algorithm
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals3D Graphics : Computer Graphics Fundamentals
3D Graphics : Computer Graphics Fundamentals
 
GRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D GraphicsGRPHICS02 - Creating 3D Graphics
GRPHICS02 - Creating 3D Graphics
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Ar1 twf030 lecture2.2
Ar1 twf030 lecture2.2Ar1 twf030 lecture2.2
Ar1 twf030 lecture2.2
 
Matrix transformation
Matrix transformationMatrix transformation
Matrix transformation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Definite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralDefinite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite Integral
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 

Viewers also liked

Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon Bramfitt
Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon BramfittSphere 3D Virtualize Conference 2015 Presentation by panelist Simon Bramfitt
Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon BramfittPeter Bookman
 
CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8fungfung Chen
 
Obj. 50 3-D Representation
Obj. 50 3-D RepresentationObj. 50 3-D Representation
Obj. 50 3-D Representationsmiller5
 
Introduction to Doctor Social Graph Project
Introduction to Doctor Social Graph ProjectIntroduction to Doctor Social Graph Project
Introduction to Doctor Social Graph ProjectBrandon Weinberg
 
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
 
On NURBS Geometry Representation in 3D modelling
On NURBS Geometry Representation in 3D modellingOn NURBS Geometry Representation in 3D modelling
On NURBS Geometry Representation in 3D modellingPirouz Nourian
 
B spline surfeces
B spline surfecesB spline surfeces
B spline surfecesramac123
 
Solid modeling
Solid modelingSolid modeling
Solid modelingKRvEsL
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cgNareek
 
Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)manojg1990
 
Intro to CAD/CAM/CIM
Intro to CAD/CAM/CIMIntro to CAD/CAM/CIM
Intro to CAD/CAM/CIMAbhay Gore
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011photomatt
 

Viewers also liked (16)

Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon Bramfitt
Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon BramfittSphere 3D Virtualize Conference 2015 Presentation by panelist Simon Bramfitt
Sphere 3D Virtualize Conference 2015 Presentation by panelist Simon Bramfitt
 
CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8CG OpenGL 3D object representations-course 8
CG OpenGL 3D object representations-course 8
 
Obj. 50 3-D Representation
Obj. 50 3-D RepresentationObj. 50 3-D Representation
Obj. 50 3-D Representation
 
Introduction to Doctor Social Graph Project
Introduction to Doctor Social Graph ProjectIntroduction to Doctor Social Graph Project
Introduction to Doctor Social Graph Project
 
object 3d(1)
object 3d(1)object 3d(1)
object 3d(1)
 
3 d transformations
3 d transformations3 d transformations
3 d transformations
 
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
 
On NURBS Geometry Representation in 3D modelling
On NURBS Geometry Representation in 3D modellingOn NURBS Geometry Representation in 3D modelling
On NURBS Geometry Representation in 3D modelling
 
B spline surfeces
B spline surfecesB spline surfeces
B spline surfeces
 
Introduction to solid modeling
Introduction to solid modelingIntroduction to solid modeling
Introduction to solid modeling
 
Solid modeling
Solid modelingSolid modeling
Solid modeling
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cg
 
Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)Geometric modeling111431635 geometric-modeling-glad (1)
Geometric modeling111431635 geometric-modeling-glad (1)
 
Intro to CAD/CAM/CIM
Intro to CAD/CAM/CIMIntro to CAD/CAM/CIM
Intro to CAD/CAM/CIM
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
 

Similar to 1422798749.2779lecture 5

Cs8092 computer graphics and multimedia unit 3
Cs8092 computer graphics and multimedia unit 3Cs8092 computer graphics and multimedia unit 3
Cs8092 computer graphics and multimedia unit 3SIMONTHOMAS S
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxyaswanthnaik27
 
Mesh final pzn_geo1004_2015_f3_2017
Mesh final pzn_geo1004_2015_f3_2017Mesh final pzn_geo1004_2015_f3_2017
Mesh final pzn_geo1004_2015_f3_2017Pirouz Nourian
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksJinTaek Seo
 
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSEAU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSEThiyagarajan G
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2Sardar Alam
 
From RNN to neural networks for cyclic undirected graphs
From RNN to neural networks for cyclic undirected graphsFrom RNN to neural networks for cyclic undirected graphs
From RNN to neural networks for cyclic undirected graphstuxette
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Takao Wada
 
Meshing for computer graphics
Meshing for computer graphicsMeshing for computer graphics
Meshing for computer graphicsBruno Levy
 
Wireframe models
Wireframe modelsWireframe models
Wireframe modelsMohd Arif
 
Clipping & Rasterization
Clipping & RasterizationClipping & Rasterization
Clipping & RasterizationAhmed Daoud
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
Output Units and Cost Function in FNN
Output Units and Cost Function in FNNOutput Units and Cost Function in FNN
Output Units and Cost Function in FNNLin JiaMing
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Bhuvnesh Pratap
 
JOSA TechTalks - Machine Learning on Graph-Structured Data
JOSA TechTalks - Machine Learning on Graph-Structured DataJOSA TechTalks - Machine Learning on Graph-Structured Data
JOSA TechTalks - Machine Learning on Graph-Structured DataJordan Open Source Association
 

Similar to 1422798749.2779lecture 5 (20)

Cs8092 computer graphics and multimedia unit 3
Cs8092 computer graphics and multimedia unit 3Cs8092 computer graphics and multimedia unit 3
Cs8092 computer graphics and multimedia unit 3
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptx
 
ae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.pptae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.ppt
 
Mesh final pzn_geo1004_2015_f3_2017
Mesh final pzn_geo1004_2015_f3_2017Mesh final pzn_geo1004_2015_f3_2017
Mesh final pzn_geo1004_2015_f3_2017
 
Notes04.pdf
Notes04.pdfNotes04.pdf
Notes04.pdf
 
Solid modeling
Solid modelingSolid modeling
Solid modeling
 
ch6.ppt
ch6.pptch6.ppt
ch6.ppt
 
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeksBeginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
Beginning direct3d gameprogramming04_3dfundamentals_20160414_jintaeks
 
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSEAU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
AU QP Answer key NOv/Dec 2015 Computer Graphics 5 sem CSE
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
From RNN to neural networks for cyclic undirected graphs
From RNN to neural networks for cyclic undirected graphsFrom RNN to neural networks for cyclic undirected graphs
From RNN to neural networks for cyclic undirected graphs
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5
 
Meshing for computer graphics
Meshing for computer graphicsMeshing for computer graphics
Meshing for computer graphics
 
Wireframe models
Wireframe modelsWireframe models
Wireframe models
 
Clipping & Rasterization
Clipping & RasterizationClipping & Rasterization
Clipping & Rasterization
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Output Units and Cost Function in FNN
Output Units and Cost Function in FNNOutput Units and Cost Function in FNN
Output Units and Cost Function in FNN
 
Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface Phong Shading over any Polygonal Surface
Phong Shading over any Polygonal Surface
 
Week6.ppt
Week6.pptWeek6.ppt
Week6.ppt
 
JOSA TechTalks - Machine Learning on Graph-Structured Data
JOSA TechTalks - Machine Learning on Graph-Structured DataJOSA TechTalks - Machine Learning on Graph-Structured Data
JOSA TechTalks - Machine Learning on Graph-Structured Data
 

Recently uploaded

Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 

Recently uploaded (20)

Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 

1422798749.2779lecture 5

  • 1. 11 Computer GraphicsComputer Graphics Chapter 7Chapter 7 3D Object Modeling3D Object Modeling
  • 2. 2 3D Object Representation3D Object Representation  A surface can be analyticallyA surface can be analytically generated using its functiongenerated using its function involving the coordinates.involving the coordinates.  An object can be represented inAn object can be represented in terms of its vertices, edges andterms of its vertices, edges and polygons. (Wire Frame,polygons. (Wire Frame, Polygonal Mesh etc.)Polygonal Mesh etc.)  Curves and surfaces can also beCurves and surfaces can also be designed using splines bydesigned using splines by specifying a set of few controlspecifying a set of few control points.points. y = f(x,z) x y z . . .
  • 3. 3 Solid Modeling - PolyhedronSolid Modeling - Polyhedron  A polyhedron is a connected mesh of simple planarA polyhedron is a connected mesh of simple planar polygons that encloses a finite amount of space.polygons that encloses a finite amount of space.  A polyhedron is a special case of a polygon mesh thatA polyhedron is a special case of a polygon mesh that satisfies the following properties:satisfies the following properties:  Every edge is shared by exactly two faces.Every edge is shared by exactly two faces.  At least three edges meet at each vertex.At least three edges meet at each vertex.  Faces do not interpenetrate. Faces at most touchFaces do not interpenetrate. Faces at most touch along a common edge.along a common edge.  Euler’s formulaEuler’s formula : If: If FF,, EE,, VV represent the number ofrepresent the number of faces, vertices and edges of a polyhedron, thenfaces, vertices and edges of a polyhedron, then VV ++ FF −− EE = 2.= 2.
  • 4. 4 3D Object Representation3D Object Representation  The data for polygonal meshesThe data for polygonal meshes can be represented in two ways.can be represented in two ways.  Method 1:Method 1:  Vertex ListVertex List  Normal ListNormal List  Face List (Polygon List)Face List (Polygon List)  Method 2:Method 2:  Vertex ListVertex List  Edge ListEdge List  Face List (Polygon List)Face List (Polygon List)
  • 5. 5 01 2 3 45 6 7 Vertices and Faces - E.g. CubeVertices and Faces - E.g. Cube 0 1 2 3 4 5 Face Index Vertex Index
  • 6. 6 Data representation using vertex, face and normal lists: Vertex List Normal List Polygon List 30 30 30 0.0 0.0 1.0 0 1 2 3 -30 30 30 0.0 0.0 -1.0 4 7 6 5 -30 -30 30 0.0 1.0 0.0 0 4 5 1 30 -30 30 -1.0 0.0 0.0 1 5 6 2 30 30 -30 0.0 -1.0 0.0 2 6 7 3 -30 30 -30 1.0 0.0 0.0 3 7 4 0 -30 -30 -30 30 -30 -30
  • 7. 7 Vertex List Edge List Polygon List x[i] y[i] z[i] L[j] M[j] P[k] Q[k] R[k] S[k] 30 30 30 0 1 0 1 2 3 -30 30 30 1 2 4 7 6 5 -30 -30 30 2 3 0 4 5 1 30 -30 30 3 0 1 5 6 2 30 30 -30 4 5 2 6 7 3 -30 30 -30 5 6 3 7 4 0 -30 -30 -30 6 7 30 -30 -30 7 4 0 4 1 5 2 6 3 7 Data representation using vertex, face and edge lists:
  • 8. 8 Normal Vectors (OpenGL)Normal Vectors (OpenGL) Assigning a normal vector to a polygon: glBegin(GL_POLYGON); glNormal3f(xn,yn,zn); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glVertex3f(x4,y4,z4); glEnd(); Enabling automatic conversion of normal vectors to unit vectors: glEnable(GL_NORMALIZE);
  • 9. 9 Regular Polyhedra (Regular Polyhedra (Platonic Solids)Platonic Solids)  If all the faces of a polyhedron areIf all the faces of a polyhedron are identical, and each is a regular polygon,identical, and each is a regular polygon, then the object is called athen the object is called a platonic solidplatonic solid..  Only five such objects exist.Only five such objects exist.
  • 10. 10 Wire-Frame ModelsWire-Frame Models  If the object is defined only by a set of nodesIf the object is defined only by a set of nodes (vertices), and a set of lines connecting the(vertices), and a set of lines connecting the nodes, then the resulting objectnodes, then the resulting object representation is called a wire-frame model.representation is called a wire-frame model.  Very suitable for engineeringVery suitable for engineering applications.applications.  Simplest 3D Model - easy to construct.Simplest 3D Model - easy to construct.  Easy to clip and manipulate.Easy to clip and manipulate.  Not suitable for building realistic models.Not suitable for building realistic models.
  • 11. 11 Wire Frame Models - OpenGLWire Frame Models - OpenGL Some Wireframe Models in OpenGL: Cube: glutWireCube(Gldouble size); Sphere: glutWireSphere(…); Torus: glutWireTorus(…); Teapot: glutWireTeapot(Gldouble size); Cone: glutWireCone(…); (…) Refer text for list of arguments.
  • 12. 12 Wire Frame Model - TheWire Frame Model - The TeapotTeapot
  • 13. 13 Polygonal MeshPolygonal Mesh  Three-dimensional surfaces and solids can beThree-dimensional surfaces and solids can be approximated by a set of polygonal and lineapproximated by a set of polygonal and line elements. Such surfaces are calledelements. Such surfaces are called polygonalpolygonal meshes.meshes.  The set of polygons or faces, together form theThe set of polygons or faces, together form the “skin” of the object.“skin” of the object.  This method can be used to represent a broadThis method can be used to represent a broad class of solids/surfaces in graphics.class of solids/surfaces in graphics.  A polygonal mesh can be rendered using hiddenA polygonal mesh can be rendered using hidden surface removal algorithms.surface removal algorithms.
  • 14. 14 Polygonal Mesh - ExamplePolygonal Mesh - Example
  • 15. 15 Solid ModelingSolid Modeling  Polygonal meshes can be used in solidPolygonal meshes can be used in solid modeling.modeling.  An object is consideredAn object is considered solidsolid if theif the polygons fit together to enclose a space.polygons fit together to enclose a space.  In solid models, it is necessary toIn solid models, it is necessary to incorporate directional information on eachincorporate directional information on each face by using theface by using the normal vectornormal vector to theto the plane of the face, and it is used in theplane of the face, and it is used in the shading process.shading process.
  • 16. 16 Solid Modeling - ExampleSolid Modeling - Example
  • 17. 17 Solid Modeling - OpenGLSolid Modeling - OpenGL Some predefined Solid Models in OpenGL: Cube: glutSolidCube(Gldouble size); Sphere: glutSolidSphere(…); Torus: glutSolidTorus(…); Teapot: glutSolidTeapot(Gldouble size); Cone: glutSolidCone(…); (…) Arguments same as wire-frame models.
  • 18. 18 Z X Y y = f(x, z) Surface ModelingSurface Modeling Many surfaces can be represented by an explicit function of two independent variables, such as y = f(x, z).
  • 19. 19 Surface Modeling - ExampleSurface Modeling - Example
  • 20. 20 Sweep RepresentationsSweep Representations  Sweep representations are useful for bothSweep representations are useful for both surface modeling and solid modeling.surface modeling and solid modeling.  A large class of shapes (both surfaces andA large class of shapes (both surfaces and solid models) can be formed bysolid models) can be formed by sweepingsweeping oror extrudingextruding a 2D shape through space.a 2D shape through space.  Sweep representations are useful forSweep representations are useful for constructing 3-D objects that possesconstructing 3-D objects that posses translational or rotational symmetries.translational or rotational symmetries.
  • 21. 21 Extruded Shapes - ExamplesExtruded Shapes - Examples A polyhedron obtained by sweeping (extruding) a polygon along a straight line is called a prism.
  • 22. 22 Surface of RevolutionSurface of Revolution  A surface of revolution is obtained byA surface of revolution is obtained by revolving a curve (known as therevolving a curve (known as the base curvebase curve oror profile curveprofile curve) about an axis.) about an axis.  In other words, a surface of revolution isIn other words, a surface of revolution is generated by agenerated by a rotational sweeprotational sweep of a 2Dof a 2D curve.curve.  The symmetry of the surface of revolutionThe symmetry of the surface of revolution makes it a very useful object inmakes it a very useful object in presentation graphics.presentation graphics.
  • 23. 23 Z X Y y = f(x) r y y (x, z) y = f(r) x 22 zxr += Surface of RevolutionSurface of Revolution
  • 24. 24 The three-dimensional surface obtained by revolving the curve y = f(x) about the y-axis is obtained by replacing x with sqrt(x*x + z*z). The surface of revolution is thus given by ( )y f x z= +2 2 Surface of RevolutionSurface of Revolution
  • 25. 25 Surface of RevolutionSurface of Revolution x x y )sin( = 22 22 sin zx zx y +       + =
  • 26. 26 Quad treesQuad trees Quad trees are generated by successivelyQuad trees are generated by successively dividing a 2-D region(usually a square) intodividing a 2-D region(usually a square) into quadrants. Each node in the quadtree hasquadrants. Each node in the quadtree has 4 data elements, one for each of the4 data elements, one for each of the quadrants in the region. If all the pixelsquadrants in the region. If all the pixels within a quadrant have the same color (awithin a quadrant have the same color (a homogeneous quadrant), thehomogeneous quadrant), the corresponding data element in the nodecorresponding data element in the node stores that color. For a heterogeneousstores that color. For a heterogeneous region of space, the successive divisionsregion of space, the successive divisions into quadrants continues until all quadrantsinto quadrants continues until all quadrants are homogeneous.are homogeneous.
  • 27. 27 OctreesOctrees  An octree encoding scheme divide regions ofAn octree encoding scheme divide regions of 3-D space(usually a cube) in to octants and3-D space(usually a cube) in to octants and stores 8 data elements in each node of thestores 8 data elements in each node of the tree.tree.  Individual elements of a 3-D space are calledIndividual elements of a 3-D space are called volume elements or voxels.volume elements or voxels.  When all voxels in an octant are of the sameWhen all voxels in an octant are of the same type, this type value is stored in thetype, this type value is stored in the corresponding data element of the node. Anycorresponding data element of the node. Any heterogeneous octant is subdivided intoheterogeneous octant is subdivided into octants and the corresponding data elementoctants and the corresponding data element in the node points to the next node in thein the node points to the next node in the octree.octree.
  • 29. 29 Bezier CurvesBezier Curves The Bezier curve only approximates the control points and doesn’t actually pass through all of them.
  • 30. 30 Inputs: n control points (xi, yi), i = 0, 1,2, …n-1 ( ) , 0 , 0 , ( ) ( ) ( ) ( ) 0 1 ! ( ) (1 ) ! ! m b m i i i m b m i i i i m i m i x u Bez u x y u Bez u y u m m m Bez u u u and i i i m i = = − = = ≤ ≤     = − = ÷  ÷ −    ∑ ∑ m = n−1 Bezier CurvesBezier Curves
  • 31. 31 Inputs: n control points (xi, yi), i = 0, 1,2, …m 0 ( ) ( ) , 0 1 ( ) ( ( ), ( )) ( , ) m m i i i i i i i r u Bez u r u where r u x u y u r x y = = ≤ ≤ = = ∑% % % % Bezier CurvesBezier Curves
  • 32. 32 Properties of Bezier CurveProperties of Bezier Curve  Bezier curve is a polynomial ofBezier curve is a polynomial of degree one less than thedegree one less than the number of control pointsnumber of control points p0 p2 p1 p0 p2 p1 p3 Quadratic Curve Cubic Curve
  • 33. 33 Properties of Bezier Curve (cont.)Properties of Bezier Curve (cont.)  Bezier curve always passesBezier curve always passes through the first and last points;through the first and last points; i.e.i.e. andand 0(0)x x= , 0(0)y y= (1) mx x= (1) my y=
  • 34. 34 Properties of Bezier CurveProperties of Bezier Curve (cont)(cont)  The slop at the beginning of the curve isThe slop at the beginning of the curve is along the line joining the first two controlalong the line joining the first two control points, and the slope at the end of thepoints, and the slope at the end of the curve is along the line joining the last twocurve is along the line joining the last two points.points. p0 p2 p1 p0 p2 p1
  • 35. 35 Properties of Bezier CurveProperties of Bezier Curve (cont)(cont)  Bezier blending functions are all positiveBezier blending functions are all positive and the sum is always 1.and the sum is always 1.  This means that the curve is the weightedThis means that the curve is the weighted sum of the control points.sum of the control points. , 0 ( ) 1 m m i i Bez u = =∑
  • 36. 36 Design Technique using BezierDesign Technique using Bezier Curves:Curves:  A closed Bezier curve can be generated byA closed Bezier curve can be generated by specifying the first and last control points atspecifying the first and last control points at the same locationthe same location p4 p0=p5 p1 p2 p3
  • 37. 37 Design Technique (Cont)Design Technique (Cont)  A Bezier curve can be made to pass closerA Bezier curve can be made to pass closer to a given coordinate position by assigningto a given coordinate position by assigning multiple control points to that position.multiple control points to that position. p0 p1 = p2 p3 p4
  • 38. 38  Bezier curve can be form by piecing ofBezier curve can be form by piecing of several Bezier section with lower degree.several Bezier section with lower degree. p0 p1 p2= p’0 p’2 p’3 p’1
  • 39. 39 (Not Important!) , 0 0 ( , ) ( ) ( ) , 0 1, 0 1 ( , ) ( ( , ), ( , ), ( , )) ( , , ) m l m i l j i j i j ij ij ij ij r u v Bez u Bez v r u v where r u v x u v y u v z u v r x y z = = = ≤ ≤ ≤ ≤ = = ∑∑% % % % Bezier SurfacesBezier Surfaces
  • 40. 40 A set of 16 control points The Bezier Patch Bezier PatchBezier Patch
  • 41. 41 Utah Teapot Defined Using Control Points Bezier PatchBezier Patch
  • 42. 42 Utah Teapot Generated Using Bezier Patches Bezier PatchBezier Patch