SlideShare a Scribd company logo
1 of 53
CG
3/4/2023
LECTURE No. (6)
Dr. Majid D. Y.
dr.majid@uomosul.edu.iq
3D Object Representations
2
of
51
Polyhedra
Objects are simply a set of surface polygons that
enclose an object interior
Simplest and fastest way to render objects
Often referred to as standard graphics objects
In many cases packages allow us to define objects
as curved surfaces etc but actually convert these
to polygon meshes for display
To define polyhedra we simply define the vertices
of the polygons required
3
of
51
Polyhedra (cont…)
4
of
51
Quadric Surfaces
A frequently used class of objects are
quadric surfaces
These are 3D surfaces described using
quadratic equations
Quadric surfaces include:
– Spheres
– Ellipsoids
– Tori
– Paraboloids
– Hyperboloids
5
of
51
Quadric Surfaces - Spheres
A spherical surface with radius r centred on
the origin is defined as the set of points (x,
y, z) that satisfy the equation
This can also be done in parametric form
using latitude and longitude angles
2
2
2
2
r
z
y
x 







sin
sin
cos
cos
cos
r
z
r
y
r
x



2
2


 




 


6
of
51
Quadric Surfaces – Spheres (cont…)
y axis
z axis
x axis
P ( x, y, z )
θ
φ
r
7
of
51
Sweep Representations
Sweep representations are useful for
constructing 3 dimensional objects that
possess translational, rotational or other
symmetries
Objects are specified as a 2 dimensional
shape and a sweep that moves that shape
through a region of space
8
of
51
Sweep Representations - Examples
9
of
51
Constructive Solid Geometry Methods
Constructive Solid Geometry (CSG)
performs solid modelling by generating a
new object from two three dimensional
objects using a set operation
Valid set operations include
– Union
– Intersection
– Difference
10
of
51
Constructive Solid Geometry Methods
(cont…)
11
of
51
Constructive Solid Geometry Methods
(cont…)
CSG usually starts with a small set of
primitives such as blocks, pyramids,
spheres and cones
Two objects re initially created and
combined using some set operation to
create a new object
This object can then be combined with
another primitive to make another new
object
This process continues until modelling
complete
12
of
51
Constructive Solid Geometry Methods
(cont…)
CSG
Object
oper1
obj1 obj2
oper3
obj4 oper2
obj2 obj3
CSG models are
usually
represented as
CSG trees
13
of
51
Constructive Solid Geometry Methods
(cont…)
14
of
51
Ray-Casting
Ray-casting is typically used to implement
CSG operators when objects are
described with boundary representations
Ray casting is applied by determining the
objects that are intersected by a set of
parallel lines emanating from the xy plane
along the z axis
The xy plane is referred to as the firing
plane
15
of
51
Ray-Casting (cont…)
16
of
51
Ray-Casting (cont…)
Surface intersections along each ray are
calculated and these are sorted according
to distance from the firing plane
The surface limits for the composite object
are then determined by the specified set
operation
17
of
51
Ray Casting Example
18
of
51
Octrees
Octrees are typically used when the interior of
objects is important
Octrees are hierarchical tree structures used
to represent solid objects.
Octrees are particularly
useful in applications that
require cross sectional
views – for example
medical applications.
19
of
51
Octrees & Quadtrees
Octrees are based on a two-dimensional
representation scheme called quadtree
encoding
Quadtree encoding divides a square region
of space into four equal areas until
homogeneous regions are found
These regions can then be arranged in a
tree
20
of
51
Quadtree Example 1
21
of
51
Quadtree Example 2
22
of
51
Octrees
Quadtree encodings provide considerable
savings in storage when large colour
areas exist in a region of space
An octree takes the same approach as
quadtrees, but divides a cube region of 3D
space into octants
Each region within an octree is referred to
as a volume element or voxel
Division is continued until homogeneous
regions are discovered
23
of
51
Octrees (cont…)
24
of
51
Octrees (cont…)
In 3 dimensions regions can be considered
to be homogeneous in terms of colour,
material type, density or any other physical
characteristics
Voxels also have the unique possibility of
being empty
25
of
51
Octree Examples
26
of
51
Octree Examples (cont…)
27
of
51
Fractals
All of the modelling techniques covered so
far use Euclidean geometry methods
– Objects were described using equations
This is fine for manufactured objects
But what about natural objects that have
irregular or fragmented features?
– Mountains, clouds, coral…
28
of
51
Fractal Geometry Methods & Procedural
Modelling
Natural objects can be realistically described
using fractal geometry methods. Fractal
methods use procedures rather than
equations to model objects - procedural
modelling
The major characteristic of any procedural
model is that the model is not based on
data, but rather on the implementation of a
procedure following a particular set of rules
Modelling On The Fly!
29
of
51
Fractals
A fractal object has two basic
characteristics:
– Infinite detail at every point
– A certain self similarity
between object parts and the
overall features of the object
The Koch Curve
Mandelbrot Set Video From:
http://fractalanimation.com/
30
of
51
Generating Fractals
A fractal object is generated by repeatedly
applying a specified transform function to
points in a region of space
If P0 = (x0, y0, z0) is a selected initial position,
each iteration of a transformation function
F generates successive levels of detail
with the calculations:
In general the transformation is applied to a
specified point set, or to a set of primitives
(e.g. lines, curves, surfaces)
      ...
,
,
, 2
3
1
2
0
1 P
F
P
P
F
P
P
F
P 


31
of
51
Generating Fractals (cont…)
Although fractal objects, by definition have
infinite detail, we only apply the
transformation a finite number of times
Obviously objects we display have finite
dimension – they fit on a page or a screen
A procedural representation approaches a
true representation as we increase the
number of iterations
The amount of detail is limited by the
resolution of the display device, but we
can always zoom in for further detail
32
of
51
Example: The Koch Snowflake
Images
taken
from
Hearn
&
Baker,
“Computer
Graphics
with
OpenGL”
(2004)
33
of
51
Example: Ferns
Very similar techniques can be used to
generate vegetation
34
of
51
Fractal Dimension
The amount of variation in the structure of a
fractal object is described as the fractal
dimension, D
– More jagged looking objects have larger
fractal dimensions
Calculating the fractal dimension can be
difficult, especially for particularly complex
fractals
We won’t look at the details of these
calculations
35
of
51
Types Of Fractals
Fractals can be classified into three groups
– Self similar fractals
• These have parts that are scaled down versions
of the entire object
• Commonly used to model trees, shrubs etc
– Self affine fractals
• Have parts that are formed with different scaling
parameters in each dimension
• Typically used for terrain, water and clouds
– Invariant fractal sets
• Fractals formed with non-linear transformations
• Mandelbrot set, Julia set – generally not so useful
36
of
51
Random Midpoint Displacement
Methods For Topography
One of the most successful uses of fractal
techniques in graphics is the generation of
landscapes
One efficient method for doing this is
random midpoint displacement
37
of
51
Random Midpoint Displacement
Methods For Topography (cont…)
Easy to do in two dimensions
Easily expanded to three dimensions to
generate terrain
Can introduce a roughness factor H to
control terrain appearance
Control surfaces can be used to start with a
general terrain shape
Terrain generation demo:
http://world.std.com/~bgw/applets/1.02/MtFractal/MtFractal.html
38
of
51
Fractals In Film Special Effects
39
of
51
Spline Representations
A spline is a smooth curve
defined mathematically
using a set of constraints
Splines have many uses:
– 2D illustration
– Fonts
– 3D Modelling
– Animation
ACM © 1987 “Principles of
traditional animation applied
to 3D computer animation”
“Manifold
Splines”,
X.
Gu,
Y.
He
&
H.
Qin,
Solid
and
Physics
Modeling
2005.
40
of
51
Physical Splines
Physical splines are used in car/boat design
Pierre Bézier
41
of
51
Big Idea
User specifies control points
Defines a smooth curve
Control
Points
Control
Points
Curve
42
of
51
Interpolation Vs Approximation
A spline curve is specified using a
set of control points
There are two ways to fit a curve to
these points:
– Interpolation - the curve passes
through all of the control points
– Approximation - the
curve does not pass
through all of the control
points
Images
taken
from
Hearn
&
Baker,
“Computer
Graphics
with
OpenGL”
(2004)
43
of
51
Convex Hulls
The boundary formed by the set of control
points for a spline is known as a convex hull
Think of an elastic band stretched around the
control points
Images
taken
from
Hearn
&
Baker,
“Computer
Graphics
with
OpenGL”
(2004)
44
of
51
Control Graphs
A polyline connecting the control points in
order is known as a control graph
Usually displayed to help designers keep
track of their splines
Images
taken
from
Hearn
&
Baker,
“Computer
Graphics
with
OpenGL”
(2004)
45
of
51
Bézier Spline Curves
A spline approximation method developed
by the French engineer Pierre Bézier for
use in the design of Renault car bodies
A Bézier curve can be fitted to any number
of control points – although usually 4 are
used
46
of
51
Bézier Spline Curves (cont…)
Consider the case of n+1 control points
denoted as pk=(xk, yk, zk) where k varies
from 0 to n
The coordinate positions are blended to
produce the position vector P(u) which
describes the path of the Bézier
polynomial function between p0 and pn





n
k
n
k
k u
u
BEZ
p
u
P
0
, 1
0
),
(
)
(
47
of
51
Bézier Spline Curves (cont…)
The Bézier blending functions BEZk,n(u) are
the Bernstein polynomials
where parameters C(n,k) are the binomial
coefficients
k
n
k
n
k u
u
k
n
C
u
BEZ 

 )
1
(
)
,
(
)
(
,
)!
(
!
!
)
,
(
k
n
k
n
k
n
C


48
of
51
Bézier Spline Curves (cont…)
So, the individual curve coordinates can be
given as follows



n
k
n
k
k u
BEZ
x
u
x
0
, )
(
)
(



n
k
n
k
k u
BEZ
z
u
z
0
, )
(
)
(



n
k
n
k
k u
BEZ
y
u
y
0
, )
(
)
(
49
of
51
Bézier Spline Curves (cont…)
50
of
51
Important Properties Of Bézier Curves
The first and last control points are the first
and last point on the curve
– P(0) = p0
– P(1) = pn
The curve lies within the convex hull as the
Bézier blending functions are all positive
and sum to 1
1
)
(
0
, 


n
k
n
k u
BEZ
51
of
51
Cubic Bézier Curve
Many graphics packages restrict Bézier
curves to have only 4 control points (i.e. n
= 3)
The blending functions when n = 3 are
simplified as follows:
3
3
,
3
2
3
,
2
2
3
,
1
3
3
,
0
)
1
(
3
)
1
(
3
)
1
(
u
BEZ
u
u
BEZ
u
u
BEZ
u
BEZ







52
of
51
Cubic Bézier Blending Functions
53
of
51
Bézier Spline Curve Exercise
y
(1, 4)
(3, 7)
(7, 1)
(11, 5)
x

More Related Content

Similar to ch6.ppt

5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdfKeerthanaP37
 
Week06 bme429-cbir
Week06 bme429-cbirWeek06 bme429-cbir
Week06 bme429-cbirIkram Moalla
 
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
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxyaswanthnaik27
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingHemantha Kulathilake
 
Solid model theory.pdf .
Solid model theory.pdf                     .Solid model theory.pdf                     .
Solid model theory.pdf .Athar739197
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Saajid Akram
 
Fisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous DrivingFisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous DrivingYu Huang
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cgNareek
 
Image segmentation
Image segmentationImage segmentation
Image segmentationRania H
 
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...PyData
 
3D theory: geometry, extrusion, co-ordinate theory
3D theory: geometry, extrusion, co-ordinate theory3D theory: geometry, extrusion, co-ordinate theory
3D theory: geometry, extrusion, co-ordinate theoryiain bruce
 
Numerical Modeling & FLAC3D Introduction.pptx
Numerical Modeling & FLAC3D Introduction.pptxNumerical Modeling & FLAC3D Introduction.pptx
Numerical Modeling & FLAC3D Introduction.pptxKothakondaMaharshi1
 
Person re-identification, PhD Day 2011
Person re-identification, PhD Day 2011Person re-identification, PhD Day 2011
Person re-identification, PhD Day 2011Riccardo Satta
 

Similar to ch6.ppt (20)

5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf5_Geometric_Modeling.pdf
5_Geometric_Modeling.pdf
 
Week06 bme429-cbir
Week06 bme429-cbirWeek06 bme429-cbir
Week06 bme429-cbir
 
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
 
From Polygons to Quadratics.pptx
From Polygons to Quadratics.pptxFrom Polygons to Quadratics.pptx
From Polygons to Quadratics.pptx
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
ae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.pptae_722_unstructured_meshes.ppt
ae_722_unstructured_meshes.ppt
 
Solid model theory.pdf .
Solid model theory.pdf                     .Solid model theory.pdf                     .
Solid model theory.pdf .
 
Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]Class[4][19th jun] [three js-camera&light]
Class[4][19th jun] [three js-camera&light]
 
Fisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous DrivingFisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous Driving
 
Solid modelling cg
Solid modelling cgSolid modelling cg
Solid modelling cg
 
Solids[1]
Solids[1]Solids[1]
Solids[1]
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
The Face of Nanomaterials: Insightful Classification Using Deep Learning - An...
 
3D theory: geometry, extrusion, co-ordinate theory
3D theory: geometry, extrusion, co-ordinate theory3D theory: geometry, extrusion, co-ordinate theory
3D theory: geometry, extrusion, co-ordinate theory
 
Numerical Modeling & FLAC3D Introduction.pptx
Numerical Modeling & FLAC3D Introduction.pptxNumerical Modeling & FLAC3D Introduction.pptx
Numerical Modeling & FLAC3D Introduction.pptx
 
0000556
00005560000556
0000556
 
Person re-identification, PhD Day 2011
Person re-identification, PhD Day 2011Person re-identification, PhD Day 2011
Person re-identification, PhD Day 2011
 

Recently uploaded

Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...Suhani Kapoor
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...anilsa9823
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...Amil baba
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Pooja Nehwal
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointGetawu
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...Pooja Nehwal
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...tanu pandey
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaUnited Arab Emirates
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...ranjana rawat
 

Recently uploaded (20)

Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
(SANA) Call Girls Landewadi ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
VIP Call Girls Hitech City ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With R...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power point
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...9004554577, Get Adorable Call Girls service. Book call girls & escort service...
9004554577, Get Adorable Call Girls service. Book call girls & escort service...
 
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In Vaishali 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In Vaishali 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
 
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Katraj ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai WisteriaDubai Call Girls O528786472 Call Girls In Dubai Wisteria
Dubai Call Girls O528786472 Call Girls In Dubai Wisteria
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 

ch6.ppt

  • 1. CG 3/4/2023 LECTURE No. (6) Dr. Majid D. Y. dr.majid@uomosul.edu.iq 3D Object Representations
  • 2. 2 of 51 Polyhedra Objects are simply a set of surface polygons that enclose an object interior Simplest and fastest way to render objects Often referred to as standard graphics objects In many cases packages allow us to define objects as curved surfaces etc but actually convert these to polygon meshes for display To define polyhedra we simply define the vertices of the polygons required
  • 4. 4 of 51 Quadric Surfaces A frequently used class of objects are quadric surfaces These are 3D surfaces described using quadratic equations Quadric surfaces include: – Spheres – Ellipsoids – Tori – Paraboloids – Hyperboloids
  • 5. 5 of 51 Quadric Surfaces - Spheres A spherical surface with radius r centred on the origin is defined as the set of points (x, y, z) that satisfy the equation This can also be done in parametric form using latitude and longitude angles 2 2 2 2 r z y x         sin sin cos cos cos r z r y r x    2 2            
  • 6. 6 of 51 Quadric Surfaces – Spheres (cont…) y axis z axis x axis P ( x, y, z ) θ φ r
  • 7. 7 of 51 Sweep Representations Sweep representations are useful for constructing 3 dimensional objects that possess translational, rotational or other symmetries Objects are specified as a 2 dimensional shape and a sweep that moves that shape through a region of space
  • 9. 9 of 51 Constructive Solid Geometry Methods Constructive Solid Geometry (CSG) performs solid modelling by generating a new object from two three dimensional objects using a set operation Valid set operations include – Union – Intersection – Difference
  • 11. 11 of 51 Constructive Solid Geometry Methods (cont…) CSG usually starts with a small set of primitives such as blocks, pyramids, spheres and cones Two objects re initially created and combined using some set operation to create a new object This object can then be combined with another primitive to make another new object This process continues until modelling complete
  • 12. 12 of 51 Constructive Solid Geometry Methods (cont…) CSG Object oper1 obj1 obj2 oper3 obj4 oper2 obj2 obj3 CSG models are usually represented as CSG trees
  • 14. 14 of 51 Ray-Casting Ray-casting is typically used to implement CSG operators when objects are described with boundary representations Ray casting is applied by determining the objects that are intersected by a set of parallel lines emanating from the xy plane along the z axis The xy plane is referred to as the firing plane
  • 16. 16 of 51 Ray-Casting (cont…) Surface intersections along each ray are calculated and these are sorted according to distance from the firing plane The surface limits for the composite object are then determined by the specified set operation
  • 18. 18 of 51 Octrees Octrees are typically used when the interior of objects is important Octrees are hierarchical tree structures used to represent solid objects. Octrees are particularly useful in applications that require cross sectional views – for example medical applications.
  • 19. 19 of 51 Octrees & Quadtrees Octrees are based on a two-dimensional representation scheme called quadtree encoding Quadtree encoding divides a square region of space into four equal areas until homogeneous regions are found These regions can then be arranged in a tree
  • 22. 22 of 51 Octrees Quadtree encodings provide considerable savings in storage when large colour areas exist in a region of space An octree takes the same approach as quadtrees, but divides a cube region of 3D space into octants Each region within an octree is referred to as a volume element or voxel Division is continued until homogeneous regions are discovered
  • 24. 24 of 51 Octrees (cont…) In 3 dimensions regions can be considered to be homogeneous in terms of colour, material type, density or any other physical characteristics Voxels also have the unique possibility of being empty
  • 27. 27 of 51 Fractals All of the modelling techniques covered so far use Euclidean geometry methods – Objects were described using equations This is fine for manufactured objects But what about natural objects that have irregular or fragmented features? – Mountains, clouds, coral…
  • 28. 28 of 51 Fractal Geometry Methods & Procedural Modelling Natural objects can be realistically described using fractal geometry methods. Fractal methods use procedures rather than equations to model objects - procedural modelling The major characteristic of any procedural model is that the model is not based on data, but rather on the implementation of a procedure following a particular set of rules Modelling On The Fly!
  • 29. 29 of 51 Fractals A fractal object has two basic characteristics: – Infinite detail at every point – A certain self similarity between object parts and the overall features of the object The Koch Curve Mandelbrot Set Video From: http://fractalanimation.com/
  • 30. 30 of 51 Generating Fractals A fractal object is generated by repeatedly applying a specified transform function to points in a region of space If P0 = (x0, y0, z0) is a selected initial position, each iteration of a transformation function F generates successive levels of detail with the calculations: In general the transformation is applied to a specified point set, or to a set of primitives (e.g. lines, curves, surfaces)       ... , , , 2 3 1 2 0 1 P F P P F P P F P   
  • 31. 31 of 51 Generating Fractals (cont…) Although fractal objects, by definition have infinite detail, we only apply the transformation a finite number of times Obviously objects we display have finite dimension – they fit on a page or a screen A procedural representation approaches a true representation as we increase the number of iterations The amount of detail is limited by the resolution of the display device, but we can always zoom in for further detail
  • 32. 32 of 51 Example: The Koch Snowflake Images taken from Hearn & Baker, “Computer Graphics with OpenGL” (2004)
  • 33. 33 of 51 Example: Ferns Very similar techniques can be used to generate vegetation
  • 34. 34 of 51 Fractal Dimension The amount of variation in the structure of a fractal object is described as the fractal dimension, D – More jagged looking objects have larger fractal dimensions Calculating the fractal dimension can be difficult, especially for particularly complex fractals We won’t look at the details of these calculations
  • 35. 35 of 51 Types Of Fractals Fractals can be classified into three groups – Self similar fractals • These have parts that are scaled down versions of the entire object • Commonly used to model trees, shrubs etc – Self affine fractals • Have parts that are formed with different scaling parameters in each dimension • Typically used for terrain, water and clouds – Invariant fractal sets • Fractals formed with non-linear transformations • Mandelbrot set, Julia set – generally not so useful
  • 36. 36 of 51 Random Midpoint Displacement Methods For Topography One of the most successful uses of fractal techniques in graphics is the generation of landscapes One efficient method for doing this is random midpoint displacement
  • 37. 37 of 51 Random Midpoint Displacement Methods For Topography (cont…) Easy to do in two dimensions Easily expanded to three dimensions to generate terrain Can introduce a roughness factor H to control terrain appearance Control surfaces can be used to start with a general terrain shape Terrain generation demo: http://world.std.com/~bgw/applets/1.02/MtFractal/MtFractal.html
  • 38. 38 of 51 Fractals In Film Special Effects
  • 39. 39 of 51 Spline Representations A spline is a smooth curve defined mathematically using a set of constraints Splines have many uses: – 2D illustration – Fonts – 3D Modelling – Animation ACM © 1987 “Principles of traditional animation applied to 3D computer animation” “Manifold Splines”, X. Gu, Y. He & H. Qin, Solid and Physics Modeling 2005.
  • 40. 40 of 51 Physical Splines Physical splines are used in car/boat design Pierre Bézier
  • 41. 41 of 51 Big Idea User specifies control points Defines a smooth curve Control Points Control Points Curve
  • 42. 42 of 51 Interpolation Vs Approximation A spline curve is specified using a set of control points There are two ways to fit a curve to these points: – Interpolation - the curve passes through all of the control points – Approximation - the curve does not pass through all of the control points Images taken from Hearn & Baker, “Computer Graphics with OpenGL” (2004)
  • 43. 43 of 51 Convex Hulls The boundary formed by the set of control points for a spline is known as a convex hull Think of an elastic band stretched around the control points Images taken from Hearn & Baker, “Computer Graphics with OpenGL” (2004)
  • 44. 44 of 51 Control Graphs A polyline connecting the control points in order is known as a control graph Usually displayed to help designers keep track of their splines Images taken from Hearn & Baker, “Computer Graphics with OpenGL” (2004)
  • 45. 45 of 51 Bézier Spline Curves A spline approximation method developed by the French engineer Pierre Bézier for use in the design of Renault car bodies A Bézier curve can be fitted to any number of control points – although usually 4 are used
  • 46. 46 of 51 Bézier Spline Curves (cont…) Consider the case of n+1 control points denoted as pk=(xk, yk, zk) where k varies from 0 to n The coordinate positions are blended to produce the position vector P(u) which describes the path of the Bézier polynomial function between p0 and pn      n k n k k u u BEZ p u P 0 , 1 0 ), ( ) (
  • 47. 47 of 51 Bézier Spline Curves (cont…) The Bézier blending functions BEZk,n(u) are the Bernstein polynomials where parameters C(n,k) are the binomial coefficients k n k n k u u k n C u BEZ    ) 1 ( ) , ( ) ( , )! ( ! ! ) , ( k n k n k n C  
  • 48. 48 of 51 Bézier Spline Curves (cont…) So, the individual curve coordinates can be given as follows    n k n k k u BEZ x u x 0 , ) ( ) (    n k n k k u BEZ z u z 0 , ) ( ) (    n k n k k u BEZ y u y 0 , ) ( ) (
  • 50. 50 of 51 Important Properties Of Bézier Curves The first and last control points are the first and last point on the curve – P(0) = p0 – P(1) = pn The curve lies within the convex hull as the Bézier blending functions are all positive and sum to 1 1 ) ( 0 ,    n k n k u BEZ
  • 51. 51 of 51 Cubic Bézier Curve Many graphics packages restrict Bézier curves to have only 4 control points (i.e. n = 3) The blending functions when n = 3 are simplified as follows: 3 3 , 3 2 3 , 2 2 3 , 1 3 3 , 0 ) 1 ( 3 ) 1 ( 3 ) 1 ( u BEZ u u BEZ u u BEZ u BEZ       
  • 53. 53 of 51 Bézier Spline Curve Exercise y (1, 4) (3, 7) (7, 1) (11, 5) x

Editor's Notes

  1. =