SlideShare a Scribd company logo
The Geometry of
Virtual Worlds
Mrs. Rashmi Bhat
Assistant Professor
St. John College of Engineering and Management, Palghar
Topics to discuss
Geometric Models
Changing Position and Orientation
Axis-Angle Representations of Rotation
Viewing Transformations
Chaining the transformations
2
Prepared by Mrs. Rashmi Bhat
Geometric Models
• A model can be any object in a Virtual World.
• e.g. Chair, a tree, wall of room, user's avatar etc.
• Objects can be transformed
• Change in position
• Change in orientation
Prepared by Mrs. Rashmi Bhat 3
Change in position Change in Orientation
Object’s first View
Object’s Top View
Object’s another View
Geometric Models
• A virtual world can be represented in 3D Euclidean space with cartesian
coordinates
• Let represents a virtual world
• Every point is represented as a triple of real-valued coordinates: (𝒙, 𝒚, 𝒛)
• We follow right handed coordinate system
Prepared by Mrs. Rashmi Bhat 4
Geometric Models
Prepared by Mrs. Rashmi Bhat 5
Fig. Coordinate System
Geometric Models
Prepared by Mrs. Rashmi Bhat 6
Fig. Coordinate Axes of Virtual World
Geometric Models
• Geometric Models
• Are made of surfaces or solid regions in
• Contain infinite no. of points
• Are defined in terms of primitives
• Each primitive represents an infinite set of points
• e.g. 3D triangle
• Planar surface/ face of the triangle is specified by the coordinates of the
triangle vertices
( 𝑥 , 𝑦 , 𝑧 , 𝑥 , 𝑦 , 𝑧 , (𝑥 , 𝑦 , 𝑧 ))
Prepared by Mrs. Rashmi Bhat 7
Geometric Models
• Geometric Models
• A complicated object or body in the virtual world modelled using
numerous triangles can be arranged into a mesh.
Prepared by Mrs. Rashmi Bhat 8
Geometric Models
• Models representation in 3D mesh-triangle provokes many questions
1. How do we specify how each triangle "looks" whenever viewed by a user in VR?
2. How do we make the object "move"?
3. If the object surface is sharply curved, then should we use curved primitives?
4. Is the interior of the object part of the model, or does the object consist only of
its surface?
5. Is there an efficient algorithm for determining which triangles are adjacent to a
given triangle along the surface?
6. Should we avoid duplicating vertex coordinates that are common to
many neighboring triangles?
Prepared by Mrs. Rashmi Bhat 9
Geometric Models
• Data Structures
• Choice of data structure for geometric models should depend on which
operation will be performed on the model.
• Most commonly used data structure is Doubly Connected Edge List(DCEL) (also
known as Half-Edge data structure)
• Three kinds of data elements
• Face represents two dimensional part of the model
• Edge represents one dimensional part of the model
• Vertex represents zero dimensional part of the model
Prepared by Mrs. Rashmi Bhat 10
Geometric Models
Prepared by Mrs. Rashmi Bhat 11
Face
Vertex
Edge
Fig. Part of a doubly connected edge list
• Data Structures
• The data structure contains pointers
between adjacent faces, edges, and
vertices so that algorithms can
quickly traverse the model
components.
Geometric Models
• Inside vs Outside
• The model forms a complete barrier between the inside and outside of the
object.
• Coherent Model
• Use of high-end design tools like Blender/ Maya
• Why triangles?
• The simplest for algorithms to handle
• Complicated primitives may lead to smaller model sizes but increases the cost
of computation
Prepared by Mrs. Rashmi Bhat 12
Geometric Models
• Stationary vs Movable Models in Virtual World
• Stationary models, which keep the same co-ordinates forever.
• Movable models, which can be transformed into various positions and
orientations.
• Motion can be caused in following ways
• Using tracking system
• With the use of controllers
• Self-movement according to the laws of physics
Prepared by Mrs. Rashmi Bhat 13
Geometric Models
• Choosing Coordinate Axes
• Important to choose coordinates for the models
• Put origin (0,0,0) in a convenient location
• 𝑦 = 0 corresponds to the floor or sea level
• 𝑥 = 0 and 𝑧 = 0 can be in the center of virtual world
• For movable models the location of the origin and axes direction is very important
Prepared by Mrs. Rashmi Bhat 14
Geometric Models
• Viewing the models
• How the model will look on VR display?
• Two parts of the problem
• Determine where the points in a virtual world should appear on display
(Transformation)
• Determining how each part of the model should appear after taking into account
lighting sources and surface properties that are defined in the virtual world.
(Rendering)
Prepared by Mrs. Rashmi Bhat 15
Changing Position and
Orientation
Prepared by Mrs. Rashmi Bhat 16
Z
X
Y
Changing Position and Orientation
• Assume model is defined as a mesh of triangles.
• Changing position: Translation
• Changing orientation: Rotations
Prepared by Mrs. Rashmi Bhat 17
(0, 0, 0) X
Y
Z
Translation
• Consider a 3D triangle
• Amount to translate the position of a given triangle be , and along the
and axis respectively.
• The operation of changing position is called translation.
• It is given by
𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧
𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧
𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧
Prepared by Mrs. Rashmi Bhat 18
Translation
• Here, , denotes that becomes replaced by after the transformation.
• This transformation will be applied to every triangle in a model.
• If the triangles are arranged in a mesh, then apply transformation to vertices
only.
Prepared by Mrs. Rashmi Bhat 19
Relativity
• Every transformation has two possible interpretations
• Translating a triangle
• Moving the origin
Prepared by Mrs. Rashmi Bhat 20
𝒙
𝒚
𝒛
(𝟐𝟎, 𝟏𝟎, 𝟎)
(𝟏𝟎, 𝟏𝟎, 𝟎)
(𝟏𝟓, 𝟏𝟓, 𝟎)
(𝟏𝟏, 𝟐, 𝟎)
(𝟏, 𝟐, 𝟎)
(𝟔, 𝟕, 𝟎)
𝒙
𝒚
𝒛
(𝟏𝟏, 𝟐, 𝟎)
(𝟏, 𝟐, 𝟎)
(𝟔, 𝟕, 𝟎)
𝒙
𝒚
𝒛
𝒙
𝒚
𝒛
(a) Original Object (b) Object moves (c) Origin moves
Object moves
Origin moves
𝒙𝒕, 𝒚𝒕, 𝒛𝒕 = (−𝟗, −𝟖, , 𝟎)
Relativity
• Relativity
• Did the object move, or did the whole world move around it?
• If the origin moves, then users would move with it.
• If users perceive themselves as having moved, then VR sickness might increase,
even though it was the object that moved.
• User’s brains make their best guess as to which type of motion occurred, and
sometimes get it wrong
Prepared by Mrs. Rashmi Bhat 21
Rotation
• Many times we need to change the model’s
orientation in the virtual world.
• The operation that changes the orientation is
called rotation.
• Rotations in three dimensions are much more
complicated than translations.
Prepared by Mrs. Rashmi Bhat 22
Rotation
• 2D Linear Transformations
• Points in 2D virtual world have coordinates (𝑥, 𝑦)
• A generic 2 × 2 matrix
𝑀 =
𝑚 𝑚
𝑚 𝑚
• Multiplication of 𝑀 with a point (𝑥, 𝑦) results in a transformed point (𝑥 , 𝑦 )
𝑚 𝑚
𝑚 𝑚
𝑥
𝑦 =
𝑥
𝑦
the matrix multiplication yields
𝑥 = 𝑚 𝑥 + 𝑚 𝑦
𝑦 = 𝑚 𝑥 + 𝑚 𝑦
• 𝑀 is a transformation for which (𝑥, 𝑦) ⟼ (𝑥 , 𝑦 )
Prepared by Mrs. Rashmi Bhat 23
………(Eq. 1)
Rotation
• 2D Linear Transformations
• Applying the 2D matrix to points
• Lets take two points (1,0) and (0,1) lying one unit of distance from the origin
(0,0) on 𝑥 and 𝑦 axes respectively.
• Substitute these points in equation A, we get
𝑚 𝑚
𝑚 𝑚
1
0
=
𝑚
𝑚
and
𝑚 𝑚
𝑚 𝑚
0
1
=
𝑚
𝑚
If is applied to transform a model, each column of indicates precisely how
each coordinate axis is changed.
Prepared by Mrs. Rashmi Bhat 24
These special points select
the column vectors on 𝑴
Rotation
• 2D Linear Transformations
• Applying the 2D matrix to points
Prepared by Mrs. Rashmi Bhat 25
𝑀 =
(0,1)
(1,0)
𝑀 =
(0,1)
(−1,0)
Causes a flip
Rotation
• 2D Linear Transformations
• Applying the 2D matrix to points
Prepared by Mrs. Rashmi Bhat 26
𝑀 =
(0,2)
(2,0)
𝑀 =
(0,2)
(1,0)
Causes scaling Causes aspect
ratio distortion
Rotation
• 2D Linear Transformations
• Applying the 2D matrix to points
Prepared by Mrs. Rashmi Bhat 27
𝑀 =
(0, −1)
(−1,0)
𝑀 =
(1,1)
(1,1)
Causes a
mirror image
2D shape
collapses into 1D
Rotation
• 2D Linear Transformations
• Applying the 2D matrix to points
Prepared by Mrs. Rashmi Bhat 28
𝑀 =
(1,1)
(1,0)
𝑀 =
(0,1) (1,1)
Causes a skew
in X direction
Causes a skew
in Y direction
Rotation
• Which matrices produce rotations?
• Matrix must satisfy the following rules to produce rotation:
1. No stretching of axes
2. No shearing
3. No mirror images
Prepared by Mrs. Rashmi Bhat 29
Rotation
Rule 1: No stretching of axes
• To satisfy 1st rule, the columns of must have unit length
and
• Scaling and shearing transformation violates this rule
Rule 2: No Shearing
• To satisfy 2nd rule, the coordinate axes must remain perpendicular.
• The columns of indicates how axes are transformed, this rule implies that
their inner (dot) product is zero.
Prepared by Mrs. Rashmi Bhat 30
………(Eq. 2)
………(Eq. 3)
Rotation
Rule 3: No Mirror Images
• To satisfy 3rd rule, the determinant of is positive
• After satisfying first two rules, only possible remaining determinants are and
.
• Rule implies that
• Mirror image results in det 𝑀 = −1
Prepared by Mrs. Rashmi Bhat 31
………(Eq. 4)
Rotation
• 1st constraint indicate that each column of
must be chosen so that, its components lie on a
unit circle, centered at origin.
and
• Instead of and , use the notation of matrix
components.
Prepared by Mrs. Rashmi Bhat 32
(0,0)
1
Rotation
• Let and , substitute this into from Eq. 1 and by
applying Eq. 3 and Eq. 4, we get and
• Hence, Eq. 1 becomes
• The full range of allowable rotations can be generated by allowing to range
from to .
Prepared by Mrs. Rashmi Bhat 33
Rotation
Prepared by Mrs. Rashmi Bhat 34
• Degree of Freedom (DOF) of a rigid body is the number of independent
movement it has.
• e.g. 6 DOF movements
Rotation
• All four components of independently results in 4 DOFs.
• The constraints in 1st rule, each removes a DOF
• 𝑚 + 𝑚 = 1 and 𝑚 + 𝑚 = 1
• The constraint in 2nd rule removes another DOF
• 𝑚 𝑚 + 𝑚 𝑚 = 0
• 3rd rule does not remove any DOF, it eliminates half of the possible
transformations.
• Result is only one DOF parametrized by the angle .
• All possible 2D rotation can be interpreted as points along a unit circle.
Prepared by Mrs. Rashmi Bhat 35
Rotation
• 3D Case of Rotation
• Extension of the matrix from A from 2D to 3D results in 9 components
• Start with 9 DOFs and determine what matrices remain valid rotations.
Prepared by Mrs. Rashmi Bhat 36
………(Eq. 5)
Rotation
Prepared by Mrs. Rashmi Bhat 37
Rotation
• 3D Case of Rotation
• Columns must have unit length.
• E.g. 𝑚 + 𝑚 + 𝑚 = 1
• Components of each column must lie on a unit sphere
• These rules remove 3 DOFs. (remaining DOFs = 6)
• Pairwise inner products of each columns must be zero
• e.g. by choosing first two columns, constraint is 𝑚 𝑚 + 𝑚 𝑚 + 𝑚 𝑚 = 0
• Apply the rule to remaining pairs.
• Each these cases eliminates a DOF, resulting in remaining 3DOFs only.
• Avoiding mirror images, det 𝑀 = 1 does not eliminate any DOF.
Prepared by Mrs. Rashmi Bhat 38
Rotation
• 3D Case of Rotation
• There are 3 degrees of rotational freedom.
• So it is possible to pick three independent parameters fro 3D rotation and then
derive all 9 components from them.
• Parameterizing 3D rotaions by constructing them from “2D-like” transformations.
Prepared by Mrs. Rashmi Bhat 39
3DOF of Rotation
Prepared by Mrs. Rashmi Bhat 40
Rotation
Yaw, Pitch and Roll
• Rotation about -axis
• Let be a counterclockwise rotation of about the 𝑧 axis.
• Rotation matrix is given by
• Upper left of matrix looks like 2D rotation matrix.
• This causes roll to behave like 2D rotation in the 𝑥𝑦 plane.
Prepared by Mrs. Rashmi Bhat 41
………(Eq. 6)
Rotation
Yaw, Pitch and Roll
• Rotation about -axis
• Let be a counterclockwise rotation of about the axis.
• Rotation matrix is given by
• Points are rotated with respect to and while the coordinate is left
unchanged.
Prepared by Mrs. Rashmi Bhat 42
………(Eq. 7)
Rotation
Yaw, Pitch and Roll
• Rotation about -axis
• Let be a counterclockwise rotation of about the axis.
• Rotation matrix is given by
• Points are rotated with respect to and while the coordinate is left
unchanged.
Prepared by Mrs. Rashmi Bhat 43
………(Eq. 6)
Rotation
• Combining Rotations
• The yaw, pitch, and roll rotations can be combined sequentially to attain any
possible 3D rotation
• The ranges of and are from to ; however, the pitch need only range
from to
Prepared by Mrs. Rashmi Bhat 44
Rotation
• Matrix multiplications are “backwards”
• Lets have a rotating point and two rotation matrices and
• If we rotate using , then
• If we then apply , we get
• Suppose, we combine two rotations first and then apply it to to get
• i.e. will give you different result
• Linear algebra reads right to left
• So we can combine first to obtain
•
Prepared by Mrs. Rashmi Bhat 45
Rotation
• Translation and Rotation in one Matrix
• Suppose we want to apply a rotation matrix , and follow it with a translation
by
𝑥
𝑦
𝑧
= 𝑅
𝑥
𝑦
𝑧
+
𝑥
𝑦
𝑧
• There is no way to form a single 3 by 3 matrix to accomplish both operations
• Homogeneous transformation matrix can be used
𝑅
𝑥
𝑦
𝑧
0 0 0 1
𝑥
𝑦
𝑧
1
=
𝑥
𝑦
𝑧
1
Prepared by Mrs. Rashmi Bhat 46
Rotation
• Inverting transforms
• To invert a translation, we apply the negation
𝑥
𝑦
𝑧
= 𝑅
𝑥
𝑦
𝑧
+
𝑥
𝑦
𝑧
• To invert rotation, we apply matrix inverse
• For rotation matrix 𝑅, the inverse is equal to the transpose 𝑅 = 𝑅
• Inverse of is
𝑅
0
0
0
0 0 0 1
1 0 0
0 1 0
0 0 1
𝑥
𝑦
𝑧
0 0 0 1
Prepared by Mrs. Rashmi Bhat 47
Axis Angle Representation of Rotation
• 3D rotation is complicated for several reasons
• Nine matrix entries are specified in terms of only three independent
parameters, and with no simple parameterization,
• The axis of rotation is not the same every time,
• The operations are non commutative, implying that the order of matrices is
crucial.
• Kinetic singularities
Prepared by Mrs. Rashmi Bhat 48

More Related Content

PDF
COMP Lecture1 - Introduction to Virtual Reality
Mark Billinghurst
 
PDF
COMP 4010 Lecture6 - Virtual Reality Input Devices
Mark Billinghurst
 
DOCX
Virtual Reality
Aditya Sharat
 
PDF
COMP 4010 Lecture5 VR Audio and Tracking
Mark Billinghurst
 
PPTX
Virtual Reality: Graphics Display Interfaces
Mihir Parikh
 
PPT
Introduction to Virtual Reality
Dr. Ambedkar Institute of Technology, Bangalore 56
 
PDF
Lecture 8 Introduction to Augmented Reality
Mark Billinghurst
 
PPTX
Virtual reality
Shruti Singh
 
COMP Lecture1 - Introduction to Virtual Reality
Mark Billinghurst
 
COMP 4010 Lecture6 - Virtual Reality Input Devices
Mark Billinghurst
 
Virtual Reality
Aditya Sharat
 
COMP 4010 Lecture5 VR Audio and Tracking
Mark Billinghurst
 
Virtual Reality: Graphics Display Interfaces
Mihir Parikh
 
Lecture 8 Introduction to Augmented Reality
Mark Billinghurst
 
Virtual reality
Shruti Singh
 

What's hot (20)

PDF
Module 1 VR.pdf
Rashmi Bhat
 
PPTX
virtual reality ppt
BhagyaReddy8
 
PPTX
Computer Graphics
Deepak Kumar Mohapatra
 
PPTX
Computer graphics
Arti Parab Academics
 
PPTX
Artificial Intelligence | Introduction to AI | What is ai?
SumitKumarShukla2
 
PPTX
Virtual Reality
Omar Ghazi
 
PPT
Virtual Reality
Naresh Pokhriyal
 
PDF
Virtual reality
majid asgharizadeh
 
PPTX
Navigating Manipulation in VR.pptx
Hyper42
 
PPT
Virtual Reality
Sagar Reddy
 
PPTX
Foundation of A.I
Megha Sharma
 
PDF
Virtual reality ppt
PrashanthBeemanathi
 
PPT
Augmented reality
premdeshmane
 
PPTX
Virtual reality ppt
diksha gaur
 
PPTX
Artificial intelligence
International Islamic University
 
PDF
Computer graphics notes
smruti sarangi
 
PPTX
Polygon mesh
Farah M. Altufaili
 
PPTX
what is Mixed reality and how it works by holo lens
nareen kumar
 
PPTX
Augmented reality ppt
Sourav Rout
 
PPTX
Virtual reality
Shakib Sarar Arnab
 
Module 1 VR.pdf
Rashmi Bhat
 
virtual reality ppt
BhagyaReddy8
 
Computer Graphics
Deepak Kumar Mohapatra
 
Computer graphics
Arti Parab Academics
 
Artificial Intelligence | Introduction to AI | What is ai?
SumitKumarShukla2
 
Virtual Reality
Omar Ghazi
 
Virtual Reality
Naresh Pokhriyal
 
Virtual reality
majid asgharizadeh
 
Navigating Manipulation in VR.pptx
Hyper42
 
Virtual Reality
Sagar Reddy
 
Foundation of A.I
Megha Sharma
 
Virtual reality ppt
PrashanthBeemanathi
 
Augmented reality
premdeshmane
 
Virtual reality ppt
diksha gaur
 
Artificial intelligence
International Islamic University
 
Computer graphics notes
smruti sarangi
 
Polygon mesh
Farah M. Altufaili
 
what is Mixed reality and how it works by holo lens
nareen kumar
 
Augmented reality ppt
Sourav Rout
 
Virtual reality
Shakib Sarar Arnab
 
Ad

Similar to The Geometry of Virtual Worlds.pdf (20)

PDF
CAD/CAM & Automation Unit I computer graphics
Aniket Joshi
 
PDF
Geometric objects and transformations
saad siddiqui
 
PPTX
Autodesk3 dmax.exe
DEV YADAV
 
PPT
Lecture 9-online
lifebreath
 
PDF
Chapter_2_Representing Position and Orientation.pdf
ssuser060b2e1
 
PDF
Computer Graphics - Lecture 03 - Virtual Cameras and the Transformation Pipeline
💻 Anton Gerdelan
 
ODP
3.4-5 : geometry-virtual-world
Degi Kwag
 
PDF
XNA L02–Basic Matrices and Transformations
Mohammad Shaker
 
PDF
unit-4-computer-graphics.pdf . VERY USE FULL
Pradeepgupta624665
 
PPT
lecture-9-online WORK PART UNIFORMITY IN
sailavanyar1
 
PPT
lecture-9-online.pptVHVHJBJBJBBJBJBBBBBHHBH
sailavanyar1
 
PPTX
01. Introduction.pptx
LUISRICARDODIAZMONTE
 
PPTX
Transformations computer graphics
Vikram Halder
 
PPTX
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
JinTaek Seo
 
PPTX
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
JinTaek Seo
 
PPT
2IV60_4_3D_transformations.ppt
ssuser67281d
 
PPTX
Geometric-Modeling-in-Graphics-and-Visual-Computing-Updated Version.pptx
ErickWasonga2
 
PPT
3 d modeling part 1
Charles Flynt
 
PPT
Transformations
Syed Zaid Irshad
 
PPTX
robotics kinematics and dynamics anaysis
getinetasimare
 
CAD/CAM & Automation Unit I computer graphics
Aniket Joshi
 
Geometric objects and transformations
saad siddiqui
 
Autodesk3 dmax.exe
DEV YADAV
 
Lecture 9-online
lifebreath
 
Chapter_2_Representing Position and Orientation.pdf
ssuser060b2e1
 
Computer Graphics - Lecture 03 - Virtual Cameras and the Transformation Pipeline
💻 Anton Gerdelan
 
3.4-5 : geometry-virtual-world
Degi Kwag
 
XNA L02–Basic Matrices and Transformations
Mohammad Shaker
 
unit-4-computer-graphics.pdf . VERY USE FULL
Pradeepgupta624665
 
lecture-9-online WORK PART UNIFORMITY IN
sailavanyar1
 
lecture-9-online.pptVHVHJBJBJBBJBJBBBBBHHBH
sailavanyar1
 
01. Introduction.pptx
LUISRICARDODIAZMONTE
 
Transformations computer graphics
Vikram Halder
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
JinTaek Seo
 
Beginning direct3d gameprogrammingmath06_transformations_20161019_jintaeks
JinTaek Seo
 
2IV60_4_3D_transformations.ppt
ssuser67281d
 
Geometric-Modeling-in-Graphics-and-Visual-Computing-Updated Version.pptx
ErickWasonga2
 
3 d modeling part 1
Charles Flynt
 
Transformations
Syed Zaid Irshad
 
robotics kinematics and dynamics anaysis
getinetasimare
 
Ad

More from Rashmi Bhat (19)

PDF
Knowledge-Based Agents in AI: Principles, Components, and Functionality
Rashmi Bhat
 
PDF
Understanding Intelligent Agents: Concepts, Structure, and Applications
Rashmi Bhat
 
PDF
Introduction to Artificial Intelligence: Concepts and Applications
Rashmi Bhat
 
PPTX
Input Output Management in Operating System
Rashmi Bhat
 
PPTX
Virtual memory management in Operating System
Rashmi Bhat
 
PPTX
Main Memory Management in Operating System
Rashmi Bhat
 
PDF
Process Scheduling in OS
Rashmi Bhat
 
PDF
Introduction to Operating System
Rashmi Bhat
 
PPTX
OLAP
Rashmi Bhat
 
PPTX
Spatial Data Mining
Rashmi Bhat
 
PPTX
Web mining
Rashmi Bhat
 
PDF
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
PDF
Clustering
Rashmi Bhat
 
PDF
Classification in Data Mining
Rashmi Bhat
 
PPTX
ETL Process
Rashmi Bhat
 
PPTX
Data Warehouse Fundamentals
Rashmi Bhat
 
PDF
Virtual Reality
Rashmi Bhat
 
PDF
Introduction To Virtual Reality
Rashmi Bhat
 
PPTX
Graph Theory
Rashmi Bhat
 
Knowledge-Based Agents in AI: Principles, Components, and Functionality
Rashmi Bhat
 
Understanding Intelligent Agents: Concepts, Structure, and Applications
Rashmi Bhat
 
Introduction to Artificial Intelligence: Concepts and Applications
Rashmi Bhat
 
Input Output Management in Operating System
Rashmi Bhat
 
Virtual memory management in Operating System
Rashmi Bhat
 
Main Memory Management in Operating System
Rashmi Bhat
 
Process Scheduling in OS
Rashmi Bhat
 
Introduction to Operating System
Rashmi Bhat
 
Spatial Data Mining
Rashmi Bhat
 
Web mining
Rashmi Bhat
 
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
Clustering
Rashmi Bhat
 
Classification in Data Mining
Rashmi Bhat
 
ETL Process
Rashmi Bhat
 
Data Warehouse Fundamentals
Rashmi Bhat
 
Virtual Reality
Rashmi Bhat
 
Introduction To Virtual Reality
Rashmi Bhat
 
Graph Theory
Rashmi Bhat
 

Recently uploaded (20)

PPTX
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PPTX
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
Kanban Cards _ Mass Action in Odoo 18.2 - Odoo Slides
Celine George
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 

The Geometry of Virtual Worlds.pdf

  • 1. The Geometry of Virtual Worlds Mrs. Rashmi Bhat Assistant Professor St. John College of Engineering and Management, Palghar
  • 2. Topics to discuss Geometric Models Changing Position and Orientation Axis-Angle Representations of Rotation Viewing Transformations Chaining the transformations 2 Prepared by Mrs. Rashmi Bhat
  • 3. Geometric Models • A model can be any object in a Virtual World. • e.g. Chair, a tree, wall of room, user's avatar etc. • Objects can be transformed • Change in position • Change in orientation Prepared by Mrs. Rashmi Bhat 3 Change in position Change in Orientation Object’s first View Object’s Top View Object’s another View
  • 4. Geometric Models • A virtual world can be represented in 3D Euclidean space with cartesian coordinates • Let represents a virtual world • Every point is represented as a triple of real-valued coordinates: (𝒙, 𝒚, 𝒛) • We follow right handed coordinate system Prepared by Mrs. Rashmi Bhat 4
  • 5. Geometric Models Prepared by Mrs. Rashmi Bhat 5 Fig. Coordinate System
  • 6. Geometric Models Prepared by Mrs. Rashmi Bhat 6 Fig. Coordinate Axes of Virtual World
  • 7. Geometric Models • Geometric Models • Are made of surfaces or solid regions in • Contain infinite no. of points • Are defined in terms of primitives • Each primitive represents an infinite set of points • e.g. 3D triangle • Planar surface/ face of the triangle is specified by the coordinates of the triangle vertices ( 𝑥 , 𝑦 , 𝑧 , 𝑥 , 𝑦 , 𝑧 , (𝑥 , 𝑦 , 𝑧 )) Prepared by Mrs. Rashmi Bhat 7
  • 8. Geometric Models • Geometric Models • A complicated object or body in the virtual world modelled using numerous triangles can be arranged into a mesh. Prepared by Mrs. Rashmi Bhat 8
  • 9. Geometric Models • Models representation in 3D mesh-triangle provokes many questions 1. How do we specify how each triangle "looks" whenever viewed by a user in VR? 2. How do we make the object "move"? 3. If the object surface is sharply curved, then should we use curved primitives? 4. Is the interior of the object part of the model, or does the object consist only of its surface? 5. Is there an efficient algorithm for determining which triangles are adjacent to a given triangle along the surface? 6. Should we avoid duplicating vertex coordinates that are common to many neighboring triangles? Prepared by Mrs. Rashmi Bhat 9
  • 10. Geometric Models • Data Structures • Choice of data structure for geometric models should depend on which operation will be performed on the model. • Most commonly used data structure is Doubly Connected Edge List(DCEL) (also known as Half-Edge data structure) • Three kinds of data elements • Face represents two dimensional part of the model • Edge represents one dimensional part of the model • Vertex represents zero dimensional part of the model Prepared by Mrs. Rashmi Bhat 10
  • 11. Geometric Models Prepared by Mrs. Rashmi Bhat 11 Face Vertex Edge Fig. Part of a doubly connected edge list • Data Structures • The data structure contains pointers between adjacent faces, edges, and vertices so that algorithms can quickly traverse the model components.
  • 12. Geometric Models • Inside vs Outside • The model forms a complete barrier between the inside and outside of the object. • Coherent Model • Use of high-end design tools like Blender/ Maya • Why triangles? • The simplest for algorithms to handle • Complicated primitives may lead to smaller model sizes but increases the cost of computation Prepared by Mrs. Rashmi Bhat 12
  • 13. Geometric Models • Stationary vs Movable Models in Virtual World • Stationary models, which keep the same co-ordinates forever. • Movable models, which can be transformed into various positions and orientations. • Motion can be caused in following ways • Using tracking system • With the use of controllers • Self-movement according to the laws of physics Prepared by Mrs. Rashmi Bhat 13
  • 14. Geometric Models • Choosing Coordinate Axes • Important to choose coordinates for the models • Put origin (0,0,0) in a convenient location • 𝑦 = 0 corresponds to the floor or sea level • 𝑥 = 0 and 𝑧 = 0 can be in the center of virtual world • For movable models the location of the origin and axes direction is very important Prepared by Mrs. Rashmi Bhat 14
  • 15. Geometric Models • Viewing the models • How the model will look on VR display? • Two parts of the problem • Determine where the points in a virtual world should appear on display (Transformation) • Determining how each part of the model should appear after taking into account lighting sources and surface properties that are defined in the virtual world. (Rendering) Prepared by Mrs. Rashmi Bhat 15
  • 17. Z X Y Changing Position and Orientation • Assume model is defined as a mesh of triangles. • Changing position: Translation • Changing orientation: Rotations Prepared by Mrs. Rashmi Bhat 17 (0, 0, 0) X Y Z
  • 18. Translation • Consider a 3D triangle • Amount to translate the position of a given triangle be , and along the and axis respectively. • The operation of changing position is called translation. • It is given by 𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧 𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧 𝑥 , 𝑦 , 𝑧 ⟼ 𝑥 + 𝑥 , 𝑦 + 𝑦 , 𝑧 + 𝑧 Prepared by Mrs. Rashmi Bhat 18
  • 19. Translation • Here, , denotes that becomes replaced by after the transformation. • This transformation will be applied to every triangle in a model. • If the triangles are arranged in a mesh, then apply transformation to vertices only. Prepared by Mrs. Rashmi Bhat 19
  • 20. Relativity • Every transformation has two possible interpretations • Translating a triangle • Moving the origin Prepared by Mrs. Rashmi Bhat 20 𝒙 𝒚 𝒛 (𝟐𝟎, 𝟏𝟎, 𝟎) (𝟏𝟎, 𝟏𝟎, 𝟎) (𝟏𝟓, 𝟏𝟓, 𝟎) (𝟏𝟏, 𝟐, 𝟎) (𝟏, 𝟐, 𝟎) (𝟔, 𝟕, 𝟎) 𝒙 𝒚 𝒛 (𝟏𝟏, 𝟐, 𝟎) (𝟏, 𝟐, 𝟎) (𝟔, 𝟕, 𝟎) 𝒙 𝒚 𝒛 𝒙 𝒚 𝒛 (a) Original Object (b) Object moves (c) Origin moves Object moves Origin moves 𝒙𝒕, 𝒚𝒕, 𝒛𝒕 = (−𝟗, −𝟖, , 𝟎)
  • 21. Relativity • Relativity • Did the object move, or did the whole world move around it? • If the origin moves, then users would move with it. • If users perceive themselves as having moved, then VR sickness might increase, even though it was the object that moved. • User’s brains make their best guess as to which type of motion occurred, and sometimes get it wrong Prepared by Mrs. Rashmi Bhat 21
  • 22. Rotation • Many times we need to change the model’s orientation in the virtual world. • The operation that changes the orientation is called rotation. • Rotations in three dimensions are much more complicated than translations. Prepared by Mrs. Rashmi Bhat 22
  • 23. Rotation • 2D Linear Transformations • Points in 2D virtual world have coordinates (𝑥, 𝑦) • A generic 2 × 2 matrix 𝑀 = 𝑚 𝑚 𝑚 𝑚 • Multiplication of 𝑀 with a point (𝑥, 𝑦) results in a transformed point (𝑥 , 𝑦 ) 𝑚 𝑚 𝑚 𝑚 𝑥 𝑦 = 𝑥 𝑦 the matrix multiplication yields 𝑥 = 𝑚 𝑥 + 𝑚 𝑦 𝑦 = 𝑚 𝑥 + 𝑚 𝑦 • 𝑀 is a transformation for which (𝑥, 𝑦) ⟼ (𝑥 , 𝑦 ) Prepared by Mrs. Rashmi Bhat 23 ………(Eq. 1)
  • 24. Rotation • 2D Linear Transformations • Applying the 2D matrix to points • Lets take two points (1,0) and (0,1) lying one unit of distance from the origin (0,0) on 𝑥 and 𝑦 axes respectively. • Substitute these points in equation A, we get 𝑚 𝑚 𝑚 𝑚 1 0 = 𝑚 𝑚 and 𝑚 𝑚 𝑚 𝑚 0 1 = 𝑚 𝑚 If is applied to transform a model, each column of indicates precisely how each coordinate axis is changed. Prepared by Mrs. Rashmi Bhat 24 These special points select the column vectors on 𝑴
  • 25. Rotation • 2D Linear Transformations • Applying the 2D matrix to points Prepared by Mrs. Rashmi Bhat 25 𝑀 = (0,1) (1,0) 𝑀 = (0,1) (−1,0) Causes a flip
  • 26. Rotation • 2D Linear Transformations • Applying the 2D matrix to points Prepared by Mrs. Rashmi Bhat 26 𝑀 = (0,2) (2,0) 𝑀 = (0,2) (1,0) Causes scaling Causes aspect ratio distortion
  • 27. Rotation • 2D Linear Transformations • Applying the 2D matrix to points Prepared by Mrs. Rashmi Bhat 27 𝑀 = (0, −1) (−1,0) 𝑀 = (1,1) (1,1) Causes a mirror image 2D shape collapses into 1D
  • 28. Rotation • 2D Linear Transformations • Applying the 2D matrix to points Prepared by Mrs. Rashmi Bhat 28 𝑀 = (1,1) (1,0) 𝑀 = (0,1) (1,1) Causes a skew in X direction Causes a skew in Y direction
  • 29. Rotation • Which matrices produce rotations? • Matrix must satisfy the following rules to produce rotation: 1. No stretching of axes 2. No shearing 3. No mirror images Prepared by Mrs. Rashmi Bhat 29
  • 30. Rotation Rule 1: No stretching of axes • To satisfy 1st rule, the columns of must have unit length and • Scaling and shearing transformation violates this rule Rule 2: No Shearing • To satisfy 2nd rule, the coordinate axes must remain perpendicular. • The columns of indicates how axes are transformed, this rule implies that their inner (dot) product is zero. Prepared by Mrs. Rashmi Bhat 30 ………(Eq. 2) ………(Eq. 3)
  • 31. Rotation Rule 3: No Mirror Images • To satisfy 3rd rule, the determinant of is positive • After satisfying first two rules, only possible remaining determinants are and . • Rule implies that • Mirror image results in det 𝑀 = −1 Prepared by Mrs. Rashmi Bhat 31 ………(Eq. 4)
  • 32. Rotation • 1st constraint indicate that each column of must be chosen so that, its components lie on a unit circle, centered at origin. and • Instead of and , use the notation of matrix components. Prepared by Mrs. Rashmi Bhat 32 (0,0) 1
  • 33. Rotation • Let and , substitute this into from Eq. 1 and by applying Eq. 3 and Eq. 4, we get and • Hence, Eq. 1 becomes • The full range of allowable rotations can be generated by allowing to range from to . Prepared by Mrs. Rashmi Bhat 33
  • 34. Rotation Prepared by Mrs. Rashmi Bhat 34 • Degree of Freedom (DOF) of a rigid body is the number of independent movement it has. • e.g. 6 DOF movements
  • 35. Rotation • All four components of independently results in 4 DOFs. • The constraints in 1st rule, each removes a DOF • 𝑚 + 𝑚 = 1 and 𝑚 + 𝑚 = 1 • The constraint in 2nd rule removes another DOF • 𝑚 𝑚 + 𝑚 𝑚 = 0 • 3rd rule does not remove any DOF, it eliminates half of the possible transformations. • Result is only one DOF parametrized by the angle . • All possible 2D rotation can be interpreted as points along a unit circle. Prepared by Mrs. Rashmi Bhat 35
  • 36. Rotation • 3D Case of Rotation • Extension of the matrix from A from 2D to 3D results in 9 components • Start with 9 DOFs and determine what matrices remain valid rotations. Prepared by Mrs. Rashmi Bhat 36 ………(Eq. 5)
  • 37. Rotation Prepared by Mrs. Rashmi Bhat 37
  • 38. Rotation • 3D Case of Rotation • Columns must have unit length. • E.g. 𝑚 + 𝑚 + 𝑚 = 1 • Components of each column must lie on a unit sphere • These rules remove 3 DOFs. (remaining DOFs = 6) • Pairwise inner products of each columns must be zero • e.g. by choosing first two columns, constraint is 𝑚 𝑚 + 𝑚 𝑚 + 𝑚 𝑚 = 0 • Apply the rule to remaining pairs. • Each these cases eliminates a DOF, resulting in remaining 3DOFs only. • Avoiding mirror images, det 𝑀 = 1 does not eliminate any DOF. Prepared by Mrs. Rashmi Bhat 38
  • 39. Rotation • 3D Case of Rotation • There are 3 degrees of rotational freedom. • So it is possible to pick three independent parameters fro 3D rotation and then derive all 9 components from them. • Parameterizing 3D rotaions by constructing them from “2D-like” transformations. Prepared by Mrs. Rashmi Bhat 39
  • 40. 3DOF of Rotation Prepared by Mrs. Rashmi Bhat 40
  • 41. Rotation Yaw, Pitch and Roll • Rotation about -axis • Let be a counterclockwise rotation of about the 𝑧 axis. • Rotation matrix is given by • Upper left of matrix looks like 2D rotation matrix. • This causes roll to behave like 2D rotation in the 𝑥𝑦 plane. Prepared by Mrs. Rashmi Bhat 41 ………(Eq. 6)
  • 42. Rotation Yaw, Pitch and Roll • Rotation about -axis • Let be a counterclockwise rotation of about the axis. • Rotation matrix is given by • Points are rotated with respect to and while the coordinate is left unchanged. Prepared by Mrs. Rashmi Bhat 42 ………(Eq. 7)
  • 43. Rotation Yaw, Pitch and Roll • Rotation about -axis • Let be a counterclockwise rotation of about the axis. • Rotation matrix is given by • Points are rotated with respect to and while the coordinate is left unchanged. Prepared by Mrs. Rashmi Bhat 43 ………(Eq. 6)
  • 44. Rotation • Combining Rotations • The yaw, pitch, and roll rotations can be combined sequentially to attain any possible 3D rotation • The ranges of and are from to ; however, the pitch need only range from to Prepared by Mrs. Rashmi Bhat 44
  • 45. Rotation • Matrix multiplications are “backwards” • Lets have a rotating point and two rotation matrices and • If we rotate using , then • If we then apply , we get • Suppose, we combine two rotations first and then apply it to to get • i.e. will give you different result • Linear algebra reads right to left • So we can combine first to obtain • Prepared by Mrs. Rashmi Bhat 45
  • 46. Rotation • Translation and Rotation in one Matrix • Suppose we want to apply a rotation matrix , and follow it with a translation by 𝑥 𝑦 𝑧 = 𝑅 𝑥 𝑦 𝑧 + 𝑥 𝑦 𝑧 • There is no way to form a single 3 by 3 matrix to accomplish both operations • Homogeneous transformation matrix can be used 𝑅 𝑥 𝑦 𝑧 0 0 0 1 𝑥 𝑦 𝑧 1 = 𝑥 𝑦 𝑧 1 Prepared by Mrs. Rashmi Bhat 46
  • 47. Rotation • Inverting transforms • To invert a translation, we apply the negation 𝑥 𝑦 𝑧 = 𝑅 𝑥 𝑦 𝑧 + 𝑥 𝑦 𝑧 • To invert rotation, we apply matrix inverse • For rotation matrix 𝑅, the inverse is equal to the transpose 𝑅 = 𝑅 • Inverse of is 𝑅 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 1 𝑥 𝑦 𝑧 0 0 0 1 Prepared by Mrs. Rashmi Bhat 47
  • 48. Axis Angle Representation of Rotation • 3D rotation is complicated for several reasons • Nine matrix entries are specified in terms of only three independent parameters, and with no simple parameterization, • The axis of rotation is not the same every time, • The operations are non commutative, implying that the order of matrices is crucial. • Kinetic singularities Prepared by Mrs. Rashmi Bhat 48