SlideShare ist ein Scribd-Unternehmen logo
1 von 34
VIRTUAL REALITY
3D COMPUTER GRAPHICS
Bharat P. Patil
M.Sc. C.S. Part II
64
`
Introduction
• 3 D computer Graphics is a large and complex
subject.
• 3D computer graphics (in contrast to 2D
computer graphics) are graphics that use a
three-dimensional representation of geometric
data (often Cartesian) that is stored in the
computer for the purposes of performing
calculations and rendering 2D images. Such
images may be stored for viewing later or
displayed in real-time.
`
The Virtual World Space
`
• The Cartesian system employs the set of 3D axes
where each axis is a orthogonal to the other two.
• The above figure illustrates a scheme where a
right handed set of axes is used to locate uniquely
any point P with Cartesian co-ordinates (x, y, z).
• The right hand system requires that when using
ones right hand, the outstretched thumb , first and
the middle fingers align with x, y, z axes
respectively.
The Virtual World Space (contd..)
`
Positioning the Virtual Observer
• The VO always has a specific location within
the VE and will gaze along some line of sight.
• The VO has two eyes which, ideally, receive two
different views of the environment to create a
3D stereoscopic image.
• To achieve this two perspective views, a
standard computer graphic procedure is used
to re-compute the VE’s co-ordinate geometry
relative to the VO’s FOR.
`
Positioning the Virtual Observer
(contd…)
`
• The procedure used depends upon y]the
method employed to define the VO’s FOR
within the VE which may involve the use of
direction cosine, XYZ fixed angles, XYZ Euler
angles or Quaternions.
Positioning the Virtual Observer (contd..)
`
Direction Cosines
• A unit 3D vector has three axial components
which are also equal to the cosines of angle
formed between the vector and 3 axes.
• These angles are known as direction cosines
and can be computed by taking dot product of
the vector and the axial unit vectors.
• These direction cosines enable any point P (x,
y, z) in one FOR to be transformed into P’ (x’, y’,
z’) in another FOR as follows:
`
Direction Cosines (contd…)
`
Direction Cosines (contd…)
`
Direction Cosines (contd…)
`
• r11, r12,r13 are the direction cosines of
secondary x-axis.
• r21, r22,r23 are the direction cosines of
secondary y-axis.
• r31, r32,r33 are the direction cosines of
secondary z-axis.
Direction Cosines (contd…)
`
XYZ Fixed Angles
• The orientation involves the use of 3 separate
rotations about a fixed FOR – these angles are
frequently referred to as Yaw, Pitch, Roll.
• The roll, pitch, yaw angles can be defined as
follows: Roll is the angle of rotation about the
Z-axis, Pitch is the angle of rotation about the
X-axis and Yaw is the angle of rotation about
the Y-axis.
`
Rotate through an angle Roll about the
Z-axis
`
Rotate through an angle Pitch about the
X-axis
`
Rotate through an angle Yaw about the
Y-axis
`
XYZ Euler Angles
• XYZ fixed angles are relative to fixed FOR while
XYZ Euler angles are relative to the local
rotating FOR.
• E.g.: A FOR is subjected to a pitch rotation and
then a yaw rotation relative to the rotating
FOR.
• Fig. shows the FOR are mutually aligned.
`
XYZ Euler Angles (contd…)
`
XYZ Euler Angles (contd…)
`
XYZ Euler Angles (contd…)
`
XYZ Euler Angles (contd…)
• Without developing the matrices for roll, pitch,
yaw and translate again, we can state that if a
VO is located in the VE using XYZ Euler angles,
then any point (x, y, z) in the VE is equivalent
to (x’, y’, z’) for the VO given the following –
`
XYZ Euler Angles (contd…)
• This too can be represented by the single
homogenous matrix operation:
`
XYZ Euler Angles (contd…)
• Where,
• T11 = cos yaw cos roll – sin yaw sin pitch sin roll
• T12 = cos yaw sin roll + sin yaw sin pitch cos roll
• T13 = -sin yaw cos pitch
• T14 = -(tx T11+ ty T12 + tz T13 )
• T21 = -cos pitch sin roll
• T22 = cos pitch cos roll
• T23 = sin pitch
• T24 = -(tx T21+ ty T22 + tz T23)
`
XYZ Euler Angles (contd…)
• T31 = sin yaw cos roll + cos yaw sin pitch sin roll
• T32 = sin yaw sin roll – cos yaw sin pitch cos roll
• T33 = cos yaw cos pitch
• T34 = - (tx T31+ ty T32 + tz T33 )
• T41 = 0
• T42 = 0
• T43 = 0
• T44 = 1
`
Quaternions
• It represents the rotation about an arbitrary
axis.
• We use 4D rotation and hence termed as
Quaternion. It is used to define the orientation
of the VO relative to the VE FOR.
• A quaternion ‘q’ is a quadruple of the real nos.
and defined as:
q = [s, v]
Where, s  Scalar
v vector
`
Quaternions (contd…)
• q = [s + xi + yj + zk]
• Here s, x, y and z are the real nos. and i, j and k
represents the unit vector in x, y and z
direction respectively.
• The two quaternions are equal if and only if
their corresponding terms are equal.
• q1 = [s1, v1] q2 = [s2, v2]
• q1 = [s1 + x1i + y1j + z1k]
• q2 = [s2 + x2i + y2j + z2k]
`
Quaternions (contd…)
q1 q2 = [(S1S2 - V1V2), S1V2 + S2V1 + V1 X V2]
`
Perspective projection
`
• Projection plane located at the xy plane.
• The plane is used to capture Perspective
projection of objects located within the VO’s
field of view.
• Any given line its intersection point with the
projection plane identifies the corresponding
position of the point in a Perspective
projection .
Perspective projection (contd…)
`
Back –face removal
• Clipping is relatively computational expensive
process any way the number of polygons to be
clipped must be investigated and back face
removal is one such technique.
• Using the relative orientation of the polygon with
the observer, polygons divided into two classes
visible and bon-visible.
• As the back-face removal strategy remove those
polygon , the VE user will effectively see through
the object.
• If this effect is not required , interiors of object
will require modeling.
`
Back –face removal (contd…)
`
Back –face removal (contd…)
• From the above equation if cosƟ is positive
then the surface is visible. If the VO is in such a
position that all surface normals are pointing
away from him then, the back-face removal
technique removes this polygon so that the
observer can view through the object
`
• Unless we allow for light to be reflected from
one surface to another , there is a very good
chance that some surface will not receive any
illumination at all.
• Consequently , when this surface are rendered,
they will appear black and unnatural.
• In anticipation of this happening , illumination
schema allow the existence of some level of
background light level called the ambient light.
Ambient light
`

Weitere ähnliche Inhalte

Was ist angesagt?

COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I Hemantha Kulathilake
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafMD Naseem Ashraf
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
Counter propagation Network
Counter propagation NetworkCounter propagation Network
Counter propagation NetworkAkshay Dhole
 
Computer Vision - Image Formation.pdf
Computer Vision - Image Formation.pdfComputer Vision - Image Formation.pdf
Computer Vision - Image Formation.pdfAmmarahMajeed
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentalsA B Shinde
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformationAnkit Garg
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainMadhu Bala
 
Lecture 11 Perspective Projection
Lecture 11 Perspective ProjectionLecture 11 Perspective Projection
Lecture 11 Perspective Projectionguest0026f
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filteringGautam Saxena
 
Lossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image ProcessingLossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image Processingpriyadharshini murugan
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compressionjeevithaelangovan
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation pptGichelle Amon
 

Was ist angesagt? (20)

COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I COM2304: Digital Image Fundamentals - I
COM2304: Digital Image Fundamentals - I
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
camera calibration
 camera calibration camera calibration
camera calibration
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Counter propagation Network
Counter propagation NetworkCounter propagation Network
Counter propagation Network
 
Computer Vision - Image Formation.pdf
Computer Vision - Image Formation.pdfComputer Vision - Image Formation.pdf
Computer Vision - Image Formation.pdf
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
Window to viewport transformation
Window to viewport transformationWindow to viewport transformation
Window to viewport transformation
 
Hog
HogHog
Hog
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Chain code in dip
Chain code in dipChain code in dip
Chain code in dip
 
Lecture 11 Perspective Projection
Lecture 11 Perspective ProjectionLecture 11 Perspective Projection
Lecture 11 Perspective Projection
 
Homomorphic filtering
Homomorphic filteringHomomorphic filtering
Homomorphic filtering
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
Lossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image ProcessingLossless predictive coding in Digital Image Processing
Lossless predictive coding in Digital Image Processing
 
Wavelet transform in image compression
Wavelet transform in image compressionWavelet transform in image compression
Wavelet transform in image compression
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
Robotics: 3D Movements
Robotics: 3D MovementsRobotics: 3D Movements
Robotics: 3D Movements
 

Ähnlich wie Virtual reality

3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewingYogita Jain
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformationsNareek
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics University of Potsdam
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
3D Transformation
3D Transformation3D Transformation
3D TransformationSwatiHans10
 
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
 
3 d transformation
3 d transformation3 d transformation
3 d transformationMani Kanth
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-onlinelifebreath
 
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of Inertia
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of InertiaProf. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of Inertia
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of InertiaVrushali Nalawade
 
Prof. V. V. Nalawade, Notes CGMI with practice numerical
Prof. V. V. Nalawade, Notes CGMI with practice numericalProf. V. V. Nalawade, Notes CGMI with practice numerical
Prof. V. V. Nalawade, Notes CGMI with practice numericalVrushali Nalawade
 
Saad alsheekh multi view
Saad alsheekh  multi viewSaad alsheekh  multi view
Saad alsheekh multi viewSaadAlSheekh1
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cgharinipriya1994
 

Ähnlich wie Virtual reality (20)

3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewing
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
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
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
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
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-online
 
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of Inertia
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of InertiaProf. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of Inertia
Prof. V. V. Nalawade, UNIT-3 Centroid, Centre off Gravity and Moment of Inertia
 
Prof. V. V. Nalawade, Notes CGMI with practice numerical
Prof. V. V. Nalawade, Notes CGMI with practice numericalProf. V. V. Nalawade, Notes CGMI with practice numerical
Prof. V. V. Nalawade, Notes CGMI with practice numerical
 
UNIT I_5.pdf
UNIT I_5.pdfUNIT I_5.pdf
UNIT I_5.pdf
 
Saad alsheekh multi view
Saad alsheekh  multi viewSaad alsheekh  multi view
Saad alsheekh multi view
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 
1533 game mathematics
1533 game mathematics1533 game mathematics
1533 game mathematics
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
 

Mehr von ReachLocal Services India (12)

Excel ppt
Excel pptExcel ppt
Excel ppt
 
Digital signatures
Digital signaturesDigital signatures
Digital signatures
 
System security
System securitySystem security
System security
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
Loop invariant computation
Loop invariant computationLoop invariant computation
Loop invariant computation
 
Distributed dbms
Distributed dbmsDistributed dbms
Distributed dbms
 
Sexual harresment on women
Sexual harresment on womenSexual harresment on women
Sexual harresment on women
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
 
Mobile network layer (mobile comm.)
Mobile network layer (mobile comm.)Mobile network layer (mobile comm.)
Mobile network layer (mobile comm.)
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)
 
Temporal data mining
Temporal data miningTemporal data mining
Temporal data mining
 

Kürzlich hochgeladen

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Kürzlich hochgeladen (20)

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

Virtual reality

  • 1. VIRTUAL REALITY 3D COMPUTER GRAPHICS Bharat P. Patil M.Sc. C.S. Part II 64
  • 2. ` Introduction • 3 D computer Graphics is a large and complex subject. • 3D computer graphics (in contrast to 2D computer graphics) are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for the purposes of performing calculations and rendering 2D images. Such images may be stored for viewing later or displayed in real-time.
  • 4. ` • The Cartesian system employs the set of 3D axes where each axis is a orthogonal to the other two. • The above figure illustrates a scheme where a right handed set of axes is used to locate uniquely any point P with Cartesian co-ordinates (x, y, z). • The right hand system requires that when using ones right hand, the outstretched thumb , first and the middle fingers align with x, y, z axes respectively. The Virtual World Space (contd..)
  • 5. ` Positioning the Virtual Observer • The VO always has a specific location within the VE and will gaze along some line of sight. • The VO has two eyes which, ideally, receive two different views of the environment to create a 3D stereoscopic image. • To achieve this two perspective views, a standard computer graphic procedure is used to re-compute the VE’s co-ordinate geometry relative to the VO’s FOR.
  • 6. ` Positioning the Virtual Observer (contd…)
  • 7. ` • The procedure used depends upon y]the method employed to define the VO’s FOR within the VE which may involve the use of direction cosine, XYZ fixed angles, XYZ Euler angles or Quaternions. Positioning the Virtual Observer (contd..)
  • 8. ` Direction Cosines • A unit 3D vector has three axial components which are also equal to the cosines of angle formed between the vector and 3 axes. • These angles are known as direction cosines and can be computed by taking dot product of the vector and the axial unit vectors. • These direction cosines enable any point P (x, y, z) in one FOR to be transformed into P’ (x’, y’, z’) in another FOR as follows:
  • 12. ` • r11, r12,r13 are the direction cosines of secondary x-axis. • r21, r22,r23 are the direction cosines of secondary y-axis. • r31, r32,r33 are the direction cosines of secondary z-axis. Direction Cosines (contd…)
  • 13. ` XYZ Fixed Angles • The orientation involves the use of 3 separate rotations about a fixed FOR – these angles are frequently referred to as Yaw, Pitch, Roll. • The roll, pitch, yaw angles can be defined as follows: Roll is the angle of rotation about the Z-axis, Pitch is the angle of rotation about the X-axis and Yaw is the angle of rotation about the Y-axis.
  • 14. ` Rotate through an angle Roll about the Z-axis
  • 15. ` Rotate through an angle Pitch about the X-axis
  • 16. ` Rotate through an angle Yaw about the Y-axis
  • 17. ` XYZ Euler Angles • XYZ fixed angles are relative to fixed FOR while XYZ Euler angles are relative to the local rotating FOR. • E.g.: A FOR is subjected to a pitch rotation and then a yaw rotation relative to the rotating FOR. • Fig. shows the FOR are mutually aligned.
  • 18. ` XYZ Euler Angles (contd…)
  • 19. ` XYZ Euler Angles (contd…)
  • 20. ` XYZ Euler Angles (contd…)
  • 21. ` XYZ Euler Angles (contd…) • Without developing the matrices for roll, pitch, yaw and translate again, we can state that if a VO is located in the VE using XYZ Euler angles, then any point (x, y, z) in the VE is equivalent to (x’, y’, z’) for the VO given the following –
  • 22. ` XYZ Euler Angles (contd…) • This too can be represented by the single homogenous matrix operation:
  • 23. ` XYZ Euler Angles (contd…) • Where, • T11 = cos yaw cos roll – sin yaw sin pitch sin roll • T12 = cos yaw sin roll + sin yaw sin pitch cos roll • T13 = -sin yaw cos pitch • T14 = -(tx T11+ ty T12 + tz T13 ) • T21 = -cos pitch sin roll • T22 = cos pitch cos roll • T23 = sin pitch • T24 = -(tx T21+ ty T22 + tz T23)
  • 24. ` XYZ Euler Angles (contd…) • T31 = sin yaw cos roll + cos yaw sin pitch sin roll • T32 = sin yaw sin roll – cos yaw sin pitch cos roll • T33 = cos yaw cos pitch • T34 = - (tx T31+ ty T32 + tz T33 ) • T41 = 0 • T42 = 0 • T43 = 0 • T44 = 1
  • 25. ` Quaternions • It represents the rotation about an arbitrary axis. • We use 4D rotation and hence termed as Quaternion. It is used to define the orientation of the VO relative to the VE FOR. • A quaternion ‘q’ is a quadruple of the real nos. and defined as: q = [s, v] Where, s  Scalar v vector
  • 26. ` Quaternions (contd…) • q = [s + xi + yj + zk] • Here s, x, y and z are the real nos. and i, j and k represents the unit vector in x, y and z direction respectively. • The two quaternions are equal if and only if their corresponding terms are equal. • q1 = [s1, v1] q2 = [s2, v2] • q1 = [s1 + x1i + y1j + z1k] • q2 = [s2 + x2i + y2j + z2k]
  • 27. ` Quaternions (contd…) q1 q2 = [(S1S2 - V1V2), S1V2 + S2V1 + V1 X V2]
  • 29. ` • Projection plane located at the xy plane. • The plane is used to capture Perspective projection of objects located within the VO’s field of view. • Any given line its intersection point with the projection plane identifies the corresponding position of the point in a Perspective projection . Perspective projection (contd…)
  • 30. ` Back –face removal • Clipping is relatively computational expensive process any way the number of polygons to be clipped must be investigated and back face removal is one such technique. • Using the relative orientation of the polygon with the observer, polygons divided into two classes visible and bon-visible. • As the back-face removal strategy remove those polygon , the VE user will effectively see through the object. • If this effect is not required , interiors of object will require modeling.
  • 32. ` Back –face removal (contd…) • From the above equation if cosƟ is positive then the surface is visible. If the VO is in such a position that all surface normals are pointing away from him then, the back-face removal technique removes this polygon so that the observer can view through the object
  • 33. ` • Unless we allow for light to be reflected from one surface to another , there is a very good chance that some surface will not receive any illumination at all. • Consequently , when this surface are rendered, they will appear black and unnatural. • In anticipation of this happening , illumination schema allow the existence of some level of background light level called the ambient light. Ambient light
  • 34. `