SlideShare a Scribd company logo
Advanced Computer GraphicsAdvanced Computer Graphics
Three Dimensional ViewingThree Dimensional Viewing
OverviewOverview
• Viewing a 3D scene
• Projections
– Parallel and perspective
OverviewOverview
• Surface rendering
OverviewOverview
• Exploded and cutaway views
OverviewOverview
• 3D and stereoscopic viewing
3D Viewing Pipeline3D Viewing Pipeline
Modeling
Transformation
Viewing
Transformation
Projectionn
Transformation
Normalization
Transformation
and Clipping
Viewport
Transformation
MC
WC
VC PC
NC
DC
Viewing CoordinatesViewing Coordinates
• Generating a view of an object in 3D is similar to
photographing the object.
• Whatever appears in the viewfinder is projected onto
the flat film surface.
• Depending on the position, orientation and aperture
size of the camera corresponding views of the scene
is obtained.
Specifying The View CoordinatesSpecifying The View Coordinates
• For a particular view of a scene
first we establish viewing-
coordinate system.
• A view-plane (or projection plane)
is set up perpendicular to the
viewing z-axis.
• World coordinates are
transformed to viewing
coordinates, then viewing
coordinates are projected onto the
view plane.
xw
zw
yw
xv
zv
yv
P0=(x0 , y0 , z0)
Specifying The View CoordinatesSpecifying The View Coordinates
• To establish the viewing reference frame, we
first pick a world coordinate position called the
view reference point.
• This point is the origin of our viewing
coordinate system. If we choose a point on an
object we can think of this point as the
position where we aim a camera to take a
picture of the object.
Specifying The View CoordinatesSpecifying The View Coordinates
• Next, we select the positive
direction for the viewing z-axis,
and the orientation of the view
plane, by specifying the view-
plane normal vector, N.
• We choose a world coordinate
position P and this point
establishes the direction for N.
• OpenGL establishes the direction
for N using the point P as a look at
point relative to the viewing
coordinate origin.
xw
zw
yw
xv
zv
P0
P
N
xv
yv
Specifying The View CoordinatesSpecifying The View Coordinates
• Finally, we choose the up direction
for the view by specifying view-up
vector V.
• This vector is used to establish the
positive direction for the yv axis.
• The vector V is perpendicular to N.
• Using N and V, we can compute a
third vector U, perpendicular to
both N and V, to define the
direction for the xv axis.
xw
zw
yw
xv
zv
yv
P0
P
N
V
Specifying The View CoordinatesSpecifying The View Coordinates
To obtain a series of views of
a scene , we can keep the the
view reference point fixed and
change the direcion of N. This
corresponds to generating
views as we move around the
viewing coordinate origin.
P0
V
N
N
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
Conversion of object
descriptions from
world to viewing
coordinates is
equivalent to
transformation that
superimpoes the
viewing reference
frame onto the world
frame using the
translation and
rotation.
xw
yw
zw
xv
yv
zv
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
First, we translate the
view reference point
to the origin of the
world coordinate
system
xw
yw
zw
xv
yv
zv
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
Second, we apply
rotations to align the
xv,, yv and zv axes with
the world xw, yw and zw
axes, respectively.
xw
yw
zw
xv
yv
zv
xv
yv
zv
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
If the view reference
point is specified at
word position (x0, y0,
z0), this point is
translated to the
world origin with the
translation matrix T.












−
−
−
=
1000
100
010
001
0
0
0
z
y
x
T
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
• The rotation
sequence requires
3 coordinate-axis
transformation
depending on the
direction of N.
• First we rotate
around xw-axis to
bring zv into the xw
-zw plane.












−
=
1000
00
00
0001
θθ
θθ
CosSin
SinCos
xR
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
Then, we rotate
around the
world yw axis to
align the zw and
zv axes.












−
=
1000
00
0010
00
αα
αα
CosSin
SinCos
yR
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
The final rotation
is about the
world zw axis to
align the yw and yv
axes.











 −
=
1000
0100
00
00
ββ
ββ
CosSin
SinCos
zR
Transformation From World ToTransformation From World To
Viewing CoordinatesViewing Coordinates
The complete transformation from world to viewing
coordinate transformation matrix is obtaine as the matrix
product
TRRRM ⋅⋅⋅= xyzvcwc,
Transformation From World To ViewingTransformation From World To Viewing
Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
y
x
x′
y′
Θ=300
0 2 4 6
0246
2
2
P=(5,5)
P0=(4,3)
y
x
x′y′
Θ=300
2 4 6
0246
2
2
P
P0
Translation:










−
−
=
100
310
401
T
Transformation From World To ViewingTransformation From World To Viewing
Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
Rotation
0246
y
xx′
y′
2 4 6
P
P0










−=
100
0866.05.0
05.0866.0
R
Transformation From World To ViewingTransformation From World To Viewing
Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
New coordinates










−
−
⋅










−=
100
310
401
100
0866.05.0
05.0866.0
.vcwcM










=




















−−
−
=










1
232.1
866.1
1
5
5
100
598.0866.0500.0
964.4500.0866.0
1
'
'
y
x
Transformation From World To ViewingTransformation From World To Viewing
Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
Alternative Method
xTRx
R
v
n
⋅⋅=










−=
−=
=
'
100
0866.0500.0
0500.0866.0
)866.0500.0(
)500.0866.0( y
x
x′y′
Θ=300
0123
1
1
P
P0
1 2 3
n
v
Transformation From World To ViewingTransformation From World To Viewing
Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
ProjectionsProjections
• Once WC description of the objects in a scene are
converted to VC we can project the 3D objects onto 2D
view-plane.
• Two types of projections:
-Parallel Projection
-Perspective Projection
Classical ViewingsClassical Viewings
• Hand drawings : Determined by a specific
relationship between the object and the viewer.
Parallel ProjectionsParallel Projections
Coordinate Positions are transformed to the view plane
along parallel lines.
P1
P2 P′2
P′1
View
Plane
Parallel ProjectionsParallel Projections
• Orthographic parallel projection
The projection is perpendicular to the view
plane.
• Oblique parallel projecion
The parallel projection is not perpendicular to
the view plane.
Orthographic Parallel ProjectionOrthographic Parallel Projection
Oblique Parallel ProjectionOblique Parallel Projection
– The projectors are still ortogonal to the projection plane
– But the projection plane can have any orientation with
respect to the object.
– It is used extensively in architectural and mechanical design.
Oblique Parallel ProjectionOblique Parallel Projection
• Preserve parallel lines but not angles
– Isometric view : Projection plane is placed
symmetrically with respect to the three principal
faces that meet at a corner of object.
– Dimetric view : Symmetric with two faces.
– Trimetric view : General case.
Oblique Parallel ProjectionOblique Parallel Projection
• Preserve parallel lines but not angles
– Isometric view : Projection plane is placed
symmetrically with respect to the three principal
faces that meet at a corner of object.
– Dimetric view : Symmetric with two faces.
– Trimetric view : General case.
Perspective ProjectionsPerspective Projections
• First discovered by Donatello, Brunelleschi,
and DaVinci during Renaissance
• Objects closer to viewer look larger
• Parallel lines appear to converge to single
point
Perspective ProjectionsPerspective Projections
In perspective projection object positions are
transformed to the view plane along lines that
converge to a point called the projection
reference point (or center of projection)
Perspective ProjectionsPerspective Projections
• In the real world, objects exhibit perspective
foreshortening: distant objects appear smaller
• The basic situation:
When we do 3-D graphics, we think of the
screen as a 2-D window onto the 3-D world:
How tall should
this bunny be?
Perspective ProjectionsPerspective Projections
The geometry of the situation is that of similar
triangles. View from above:
d
P (x, y, z) X
Z
(0,0,0)x′ = ?
Perspective ProjectionsPerspective Projections
View plane
(xp, yp)
Desired result for a point [x, y, z, 1]T
projected
onto the view plane:
dz
dz
y
z
yd
y
dz
x
z
xd
x
z
y
d
y
z
x
d
x
==
⋅
==
⋅
=
==
',','
'
,
'
Perspective ProjectionsPerspective Projections
• When a camera used to take a picture, the
type of lens used determines how much of
the scene is caught on the film.
• In 3D viewing, a rectangular view window in
the view plane is used to the same effect.
Edges of the view window are parallel to the
xv-yv axes and window boundary positions are
specified in viewing coordinates.
View VolumesView Volumes
View VolumesView Volumes
zv
window
Front Plane
Back Plane
View volume
Parallel ProjectionParallel Projection Perspective Projection
Front Plane
Back Plane
View volume
(frustum)
window
Projection
Reference Point
ClippingClipping
• An algorithm for 3D clipping identifies and
saves all surface segments within the view
volume for display.
• All parts of object that are outside the view
volume are discarded.
Clipping LinesClipping Lines
Just like the case in two dimensions, clipping removes
objects that will not be visible from the scene
The point of this is to remove computational effort
3-D clipping is achieved in two basic steps
– Discard objects that can’t be viewed
• i.e. objects that are behind the camera, outside
the field of view, or too far away
– Clip objects that intersect with any clipping plane
Discard ObjectsDiscard Objects
Discarding objects that cannot possibly be seen involves
comparing an objects bounding box/sphere against the
dimensions of the view volume
– Can be done before or after projection
Clipping Polygon SurfaceClipping Polygon Surface
• To clip a polygon surface, we can clip the individual
polygon edges.
• First we test the coordinate extends against each
boundary of the view volume to determine whether
the object is completely inside or completely outside
of that boundary.
• If the object has intersection with the boundary then
we apply intersection calculations.
Clipping Polygon SurfaceClipping Polygon Surface
• The projection operation can take place before the
view- volume clipping or after clipping.
• All objects within the view volume map to the interior
of the specified projection window.
• The last step is to transform the window contents to a
2D view port.
NormalisationNormalisation
The transformed volume is then
normalised around position (0, 0, 0) and
the z axis is reversed
Dividing Up The WorldDividing Up The World
Similar to the case in two dimensions, we
divide the world into regions
This time we use a 6-bit region code to
give us 27 different region codes
The bits in these regions codes are as
follows:
bit 6
Far
bit 5
Near
bit 4
Top
bit 3
Bottom
bit 2
Right
bit 1
Left
Region CodesRegion Codes
3D Line Clipping Example (cont…)3D Line Clipping Example (cont…)
When then simply continue as per the two
dimensional line clipping algorithm
Clipping Polygon SurfaceClipping Polygon Surface
Viev volume
3D Polygon Clipping (cont…)3D Polygon Clipping (cont…)
In this case we first try to eliminate the
entire object using its bounding volume
Next we perform clipping on the individual
polygons using the Sutherland-Hodgman
algorithm we studied previously
OpenGL Projection CommandsOpenGL Projection Commands
OpenGLOpenGL Look-At FunctionLook-At Function
• OpenGL utility function
– VRP: eyePoint (eyex, eyey, eyez)
– VPN: – ( atPoint – eyePoint ) (atx, aty, atz) – (eyex, eyey, eyez)
– VUP: upPoint – eyePoint (upx, upy, upz)
gluLookAt(eyex, eyey, eyez, atx, aty, atz, upx, upy, upz);
look-at positioning
Projections in OpenGLProjections in OpenGL
• Angle of view, field of view :
– Only objects that fit within
the angle of view of the
camera appear in the
image
• View volume, view frustum :
– Be clipped out of scene
– Frustum – truncated
pyramid

More Related Content

What's hot

3D Display
3D Display3D Display
3D Display
Toushik Paul
 
Back face detection
Back face detectionBack face detection
Back face detection
Pooja Dixit
 
Raster scan system
Raster scan systemRaster scan system
Raster scan systemMohd Arif
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
Mani Kanth
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformationsMohd Arif
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
Timbal Mayank
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
Mohammed Mahmoud
 
Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)
shalinikarunakaran1
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewing
Rabin BK
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewingMohd Arif
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
Michael Heron
 
4. THREE DIMENSIONAL DISPLAY METHODS
4.	THREE DIMENSIONAL DISPLAY METHODS4.	THREE DIMENSIONAL DISPLAY METHODS
4. THREE DIMENSIONAL DISPLAY METHODS
SanthiNivas
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
University of Potsdam
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
LOKENDRA PRAJAPATI
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
Selvakumar Gna
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
dhruv141293
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Video display devices
Video display devicesVideo display devices
Video display devicesMohd Arif
 

What's hot (20)

3D Display
3D Display3D Display
3D Display
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Raster scan system
Raster scan systemRaster scan system
Raster scan system
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformations
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)
 
3 d viewing
3 d viewing3 d viewing
3 d viewing
 
Graphics_3D viewing
Graphics_3D viewingGraphics_3D viewing
Graphics_3D viewing
 
Two dimensional viewing
Two dimensional viewingTwo dimensional viewing
Two dimensional viewing
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
4. THREE DIMENSIONAL DISPLAY METHODS
4.	THREE DIMENSIONAL DISPLAY METHODS4.	THREE DIMENSIONAL DISPLAY METHODS
4. THREE DIMENSIONAL DISPLAY METHODS
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
Color Models Computer Graphics
Color Models Computer GraphicsColor Models Computer Graphics
Color Models Computer Graphics
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Video display devices
Video display devicesVideo display devices
Video display devices
 

Similar to Three dimensional concepts - Computer Graphics

projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing
Krishna Gali
 
3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewing
Yogita Jain
 
Lec08112004.pdf
Lec08112004.pdfLec08112004.pdf
Lec08112004.pdf
LalithaPonnam
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
Jaya Teja
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
Ahammednayeem
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
sabbirantor
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
Mahmudul Hasan
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
ReachLocal Services India
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
Ankit Surti
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformationssaad siddiqui
 
6. Perspective Projection .pdf
6. Perspective  Projection                    .pdf6. Perspective  Projection                    .pdf
6. Perspective Projection .pdf
YatruHarshaHiski
 
Saad alsheekh multi view
Saad alsheekh  multi viewSaad alsheekh  multi view
Saad alsheekh multi view
SaadAlSheekh1
 
Surface design and visible surfaces
Surface design and visible surfacesSurface design and visible surfaces
Surface design and visible surfaces
Arti Parab Academics
 
Projections.pptx
Projections.pptxProjections.pptx
Projections.pptx
jyoti_lakhani
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
lokesh503
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabuslokesh503
 
Notes04.pdf
Notes04.pdfNotes04.pdf
Notes04.pdf
MukeshKumar605825
 
Parallel projection
Parallel projectionParallel projection
Parallel projection
Prince Shahu
 

Similar to Three dimensional concepts - Computer Graphics (20)

projections - engineering drawing
projections - engineering drawing projections - engineering drawing
projections - engineering drawing
 
3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewing
 
Lec08112004.pdf
Lec08112004.pdfLec08112004.pdf
Lec08112004.pdf
 
Projection
ProjectionProjection
Projection
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
 
COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"COMPUTER GRAPHICS-"Projection"
COMPUTER GRAPHICS-"Projection"
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformations
 
6. Perspective Projection .pdf
6. Perspective  Projection                    .pdf6. Perspective  Projection                    .pdf
6. Perspective Projection .pdf
 
Saad alsheekh multi view
Saad alsheekh  multi viewSaad alsheekh  multi view
Saad alsheekh multi view
 
Surface design and visible surfaces
Surface design and visible surfacesSurface design and visible surfaces
Surface design and visible surfaces
 
Projections.pptx
Projections.pptxProjections.pptx
Projections.pptx
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
 
View in 3_d_asper_syllabus
View in 3_d_asper_syllabusView in 3_d_asper_syllabus
View in 3_d_asper_syllabus
 
Notes04.pdf
Notes04.pdfNotes04.pdf
Notes04.pdf
 
Parallel projection
Parallel projectionParallel projection
Parallel projection
 
08viewing3d
08viewing3d08viewing3d
08viewing3d
 

Recently uploaded

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 

Recently uploaded (20)

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 

Three dimensional concepts - Computer Graphics

  • 1. Advanced Computer GraphicsAdvanced Computer Graphics Three Dimensional ViewingThree Dimensional Viewing
  • 2. OverviewOverview • Viewing a 3D scene • Projections – Parallel and perspective
  • 5. OverviewOverview • 3D and stereoscopic viewing
  • 6. 3D Viewing Pipeline3D Viewing Pipeline Modeling Transformation Viewing Transformation Projectionn Transformation Normalization Transformation and Clipping Viewport Transformation MC WC VC PC NC DC
  • 7. Viewing CoordinatesViewing Coordinates • Generating a view of an object in 3D is similar to photographing the object. • Whatever appears in the viewfinder is projected onto the flat film surface. • Depending on the position, orientation and aperture size of the camera corresponding views of the scene is obtained.
  • 8. Specifying The View CoordinatesSpecifying The View Coordinates • For a particular view of a scene first we establish viewing- coordinate system. • A view-plane (or projection plane) is set up perpendicular to the viewing z-axis. • World coordinates are transformed to viewing coordinates, then viewing coordinates are projected onto the view plane. xw zw yw xv zv yv P0=(x0 , y0 , z0)
  • 9. Specifying The View CoordinatesSpecifying The View Coordinates • To establish the viewing reference frame, we first pick a world coordinate position called the view reference point. • This point is the origin of our viewing coordinate system. If we choose a point on an object we can think of this point as the position where we aim a camera to take a picture of the object.
  • 10. Specifying The View CoordinatesSpecifying The View Coordinates • Next, we select the positive direction for the viewing z-axis, and the orientation of the view plane, by specifying the view- plane normal vector, N. • We choose a world coordinate position P and this point establishes the direction for N. • OpenGL establishes the direction for N using the point P as a look at point relative to the viewing coordinate origin. xw zw yw xv zv P0 P N xv yv
  • 11. Specifying The View CoordinatesSpecifying The View Coordinates • Finally, we choose the up direction for the view by specifying view-up vector V. • This vector is used to establish the positive direction for the yv axis. • The vector V is perpendicular to N. • Using N and V, we can compute a third vector U, perpendicular to both N and V, to define the direction for the xv axis. xw zw yw xv zv yv P0 P N V
  • 12. Specifying The View CoordinatesSpecifying The View Coordinates To obtain a series of views of a scene , we can keep the the view reference point fixed and change the direcion of N. This corresponds to generating views as we move around the viewing coordinate origin. P0 V N N
  • 13. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates Conversion of object descriptions from world to viewing coordinates is equivalent to transformation that superimpoes the viewing reference frame onto the world frame using the translation and rotation. xw yw zw xv yv zv
  • 14. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates First, we translate the view reference point to the origin of the world coordinate system xw yw zw xv yv zv
  • 15. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates Second, we apply rotations to align the xv,, yv and zv axes with the world xw, yw and zw axes, respectively. xw yw zw xv yv zv xv yv zv
  • 16. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates If the view reference point is specified at word position (x0, y0, z0), this point is translated to the world origin with the translation matrix T.             − − − = 1000 100 010 001 0 0 0 z y x T
  • 17. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates • The rotation sequence requires 3 coordinate-axis transformation depending on the direction of N. • First we rotate around xw-axis to bring zv into the xw -zw plane.             − = 1000 00 00 0001 θθ θθ CosSin SinCos xR
  • 18. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates Then, we rotate around the world yw axis to align the zw and zv axes.             − = 1000 00 0010 00 αα αα CosSin SinCos yR
  • 19. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates The final rotation is about the world zw axis to align the yw and yv axes.             − = 1000 0100 00 00 ββ ββ CosSin SinCos zR
  • 20. Transformation From World ToTransformation From World To Viewing CoordinatesViewing Coordinates The complete transformation from world to viewing coordinate transformation matrix is obtaine as the matrix product TRRRM ⋅⋅⋅= xyzvcwc,
  • 21. Transformation From World To ViewingTransformation From World To Viewing Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System y x x′ y′ Θ=300 0 2 4 6 0246 2 2 P=(5,5) P0=(4,3)
  • 22. y x x′y′ Θ=300 2 4 6 0246 2 2 P P0 Translation:           − − = 100 310 401 T Transformation From World To ViewingTransformation From World To Viewing Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
  • 23. Rotation 0246 y xx′ y′ 2 4 6 P P0           −= 100 0866.05.0 05.0866.0 R Transformation From World To ViewingTransformation From World To Viewing Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
  • 25. Alternative Method xTRx R v n ⋅⋅=           −= −= = ' 100 0866.0500.0 0500.0866.0 )866.0500.0( )500.0866.0( y x x′y′ Θ=300 0123 1 1 P P0 1 2 3 n v Transformation From World To ViewingTransformation From World To Viewing Coordinates:Coordinates: An Example For 2d SystemAn Example For 2d System
  • 26. ProjectionsProjections • Once WC description of the objects in a scene are converted to VC we can project the 3D objects onto 2D view-plane. • Two types of projections: -Parallel Projection -Perspective Projection
  • 27. Classical ViewingsClassical Viewings • Hand drawings : Determined by a specific relationship between the object and the viewer.
  • 28. Parallel ProjectionsParallel Projections Coordinate Positions are transformed to the view plane along parallel lines. P1 P2 P′2 P′1 View Plane
  • 29. Parallel ProjectionsParallel Projections • Orthographic parallel projection The projection is perpendicular to the view plane. • Oblique parallel projecion The parallel projection is not perpendicular to the view plane.
  • 31. Oblique Parallel ProjectionOblique Parallel Projection – The projectors are still ortogonal to the projection plane – But the projection plane can have any orientation with respect to the object. – It is used extensively in architectural and mechanical design.
  • 32. Oblique Parallel ProjectionOblique Parallel Projection • Preserve parallel lines but not angles – Isometric view : Projection plane is placed symmetrically with respect to the three principal faces that meet at a corner of object. – Dimetric view : Symmetric with two faces. – Trimetric view : General case.
  • 33. Oblique Parallel ProjectionOblique Parallel Projection • Preserve parallel lines but not angles – Isometric view : Projection plane is placed symmetrically with respect to the three principal faces that meet at a corner of object. – Dimetric view : Symmetric with two faces. – Trimetric view : General case.
  • 34. Perspective ProjectionsPerspective Projections • First discovered by Donatello, Brunelleschi, and DaVinci during Renaissance • Objects closer to viewer look larger • Parallel lines appear to converge to single point
  • 35. Perspective ProjectionsPerspective Projections In perspective projection object positions are transformed to the view plane along lines that converge to a point called the projection reference point (or center of projection)
  • 36. Perspective ProjectionsPerspective Projections • In the real world, objects exhibit perspective foreshortening: distant objects appear smaller • The basic situation:
  • 37. When we do 3-D graphics, we think of the screen as a 2-D window onto the 3-D world: How tall should this bunny be? Perspective ProjectionsPerspective Projections
  • 38. The geometry of the situation is that of similar triangles. View from above: d P (x, y, z) X Z (0,0,0)x′ = ? Perspective ProjectionsPerspective Projections View plane (xp, yp)
  • 39. Desired result for a point [x, y, z, 1]T projected onto the view plane: dz dz y z yd y dz x z xd x z y d y z x d x == ⋅ == ⋅ = == ',',' ' , ' Perspective ProjectionsPerspective Projections
  • 40. • When a camera used to take a picture, the type of lens used determines how much of the scene is caught on the film. • In 3D viewing, a rectangular view window in the view plane is used to the same effect. Edges of the view window are parallel to the xv-yv axes and window boundary positions are specified in viewing coordinates. View VolumesView Volumes
  • 41. View VolumesView Volumes zv window Front Plane Back Plane View volume Parallel ProjectionParallel Projection Perspective Projection Front Plane Back Plane View volume (frustum) window Projection Reference Point
  • 42. ClippingClipping • An algorithm for 3D clipping identifies and saves all surface segments within the view volume for display. • All parts of object that are outside the view volume are discarded.
  • 43. Clipping LinesClipping Lines Just like the case in two dimensions, clipping removes objects that will not be visible from the scene The point of this is to remove computational effort 3-D clipping is achieved in two basic steps – Discard objects that can’t be viewed • i.e. objects that are behind the camera, outside the field of view, or too far away – Clip objects that intersect with any clipping plane
  • 44. Discard ObjectsDiscard Objects Discarding objects that cannot possibly be seen involves comparing an objects bounding box/sphere against the dimensions of the view volume – Can be done before or after projection
  • 45. Clipping Polygon SurfaceClipping Polygon Surface • To clip a polygon surface, we can clip the individual polygon edges. • First we test the coordinate extends against each boundary of the view volume to determine whether the object is completely inside or completely outside of that boundary. • If the object has intersection with the boundary then we apply intersection calculations.
  • 46. Clipping Polygon SurfaceClipping Polygon Surface • The projection operation can take place before the view- volume clipping or after clipping. • All objects within the view volume map to the interior of the specified projection window. • The last step is to transform the window contents to a 2D view port.
  • 47. NormalisationNormalisation The transformed volume is then normalised around position (0, 0, 0) and the z axis is reversed
  • 48. Dividing Up The WorldDividing Up The World Similar to the case in two dimensions, we divide the world into regions This time we use a 6-bit region code to give us 27 different region codes The bits in these regions codes are as follows: bit 6 Far bit 5 Near bit 4 Top bit 3 Bottom bit 2 Right bit 1 Left
  • 50. 3D Line Clipping Example (cont…)3D Line Clipping Example (cont…) When then simply continue as per the two dimensional line clipping algorithm
  • 51. Clipping Polygon SurfaceClipping Polygon Surface Viev volume
  • 52. 3D Polygon Clipping (cont…)3D Polygon Clipping (cont…) In this case we first try to eliminate the entire object using its bounding volume Next we perform clipping on the individual polygons using the Sutherland-Hodgman algorithm we studied previously
  • 53. OpenGL Projection CommandsOpenGL Projection Commands
  • 54. OpenGLOpenGL Look-At FunctionLook-At Function • OpenGL utility function – VRP: eyePoint (eyex, eyey, eyez) – VPN: – ( atPoint – eyePoint ) (atx, aty, atz) – (eyex, eyey, eyez) – VUP: upPoint – eyePoint (upx, upy, upz) gluLookAt(eyex, eyey, eyez, atx, aty, atz, upx, upy, upz); look-at positioning
  • 55. Projections in OpenGLProjections in OpenGL • Angle of view, field of view : – Only objects that fit within the angle of view of the camera appear in the image • View volume, view frustum : – Be clipped out of scene – Frustum – truncated pyramid