You are on page 1of 14

Fundamentals of Augmented

and Virtual Reality


Adithya Balasubramanyam
Department of Computer Science and Engineering
FUNDAMENTALS OF AUGMENTED
AND VIRTUAL REALITY
Unit 1: Graphical System and Programming

Adithya Balasubramanyam, PhD (Computer Graphics and Virtual Reality)


Department of Computer Science and Engineering
Virtual Reality and its Applications
3D Coordinate System for VR Object

• A Virtual Object has 6 Degree


of Freedom

Click to add text • Translation in X, Y and Z axes

• Rotation around X, Y and Z


axes

• The rotation about the


primary axes (X, Y and Z) is
also respectively called as
Pitch, Roll and Yaw. 
Virtual Reality and its Applications
Identify the Degree of Freedom
Virtual Reality and its Applications
Identify the Degree of Freedom
Graphics Programming
Convex Polygon

• A Polygon where all interior angles are less than 180°

• Given any two points within the polygon, all the points in the
line segment connecting them stays inside the polygon
Graphics Programming
What is Convex Hull?

• Smallest convex polygon containing a given set of points

• This can be generalized to n-dimensions


Graphics Programming
What is Convex Hull Algorithm?

• Given a set of n points (identified with their coordinates)

Find the convex hull of those points?


Graphics Programming
Examples of Convex Hull

• Gift-Wrapping Algorithm (Jarvis March)

• Quickhull

• Divide and Conquer

• Monotone chain

• Incremental Convex Hull Algorithm

• Chan’s Algorithm

• Graham Scan
Graphics Programming
Why is it used?

• Geometry

• Robotic path planning

• Computer Graphics

• Collision Detection

• Shadows

• Lighting
Graphics Programming
Graham’s algorithm for finding Convex Hull

1. Let p0 be the first point (lowermost, left if tie)


2. Let { p1, p2, p3 . . . pn } be the rest of the points in lexicographic polar sorted order
3. Stack.push(p0)
4. Stack.push(p1)
5. Stack.push(p2) 8
6. for( int i=3; i<=m; i++ ) 7
7. while angle from pi, stack.top, and stack.second is a non-left turn
8. Stack.pop( )
9. Stack.push(pi)
10. return the stack 6
5
0
4

2
1
Graphics Programming
Find Convex Hull
THANK YOU

Dr. Adithya Balasubramanyam


Department of Computer Science and Engineering
Adithyab@pes.edu
+91-900-834-2234

You might also like