SlideShare a Scribd company logo
1 of 18
Download to read offline
An Easier Approach to Visible
Edge Determination from
Moving Viewpoint
Shibbir Ahmed (Presenter)
Friday, April 11, 2014
An Easier Approach to Visible Edge Determination from Moving Viewpoint 2/18
Outline
Problem Statement
Background
Motivation
Preliminaries
Our Approach
Proposed Algorithm
Optimization in case of Moving Viewpoint
Implementation Details & Performance Analysis
An Easier Approach to Visible Edge Determination from Moving Viewpoint 3/18
Problem Statement
Viewpoint
Obstacles
Unbounded
Visible Region
ViewpointMoving Viewpoint
Input Output
An Easier Approach to Visible Edge Determination from Moving Viewpoint 4/18
Background
1963 ; Back-face Culling is used𝑅𝑜𝑏𝑒𝑟𝑡′ 𝑠 Algorithm
𝐴𝑝𝑝𝑙𝑒′s Algorithm 1967; Polygon instead of Polyhedron
𝑃𝑎𝑖𝑛𝑡𝑒𝑟′s Algorithm
Render polygons from back to front,
‘painting over’ previous polygons
𝑧𝐵uffer Algorithm
Polygons are scan converted in arbitrary order.
When pixels overlap, Intensity & Depth buffer is
used to decide which polygon gets that pixel
𝐵𝑆𝑃 Tree Split a line to apply Divide & Conquer in spatial
subdivision; process front & back sub-tree recursively
𝑆𝑐𝑎n𝑙𝑖𝑛𝑒 Algorithm
Render scene scan line for image precision
by maintaining various lists of tables of edge,
active edge, polygon, active polygon
An Easier Approach to Visible Edge Determination from Moving Viewpoint 5/18
Motivation
Less complicated approach; can be easily
implemented
Determines Visible Regions besides visible
edges
Same approach applicable for Moving Viewpoint
i.e., easier incremental approach for the problem
Optimization of algorithm for moving viewpoint
ensures better time complexity
An Easier Approach to Visible Edge Determination from Moving Viewpoint 6/18
Preliminaries
Object Edge
Edge of simple rectangular objects which may or may not be visible
from a particular viewpoint
Active Edge
Always an Object Edge ; At any
point throughout the run of the
algorithm, there is always a
single active edge which is
updated time to time
Extension Line
Lines drawn from endpoint of objects to detect new active edge
(in case of intersection) or visible Unbounded region (in case of
infinite Extension Line)
Extension Line
Object Edge
Viewpoint
Object Edge
Extension Line
Visible
Edge
An Easier Approach to Visible Edge Determination from Moving Viewpoint 7/18
Preliminaries (contd.)
Object Endpoints
Total number of
endpoints
𝑛
Closest endpoint from 𝑃𝑣𝑃𝑜
𝑃0, 𝑃1, 𝑃2, 𝑃3, 𝑃4, … … … , 𝑃𝑛
𝑃𝑣
𝑃0
𝑃1
𝑃2𝑃3
𝑃4 𝑃5
𝑃6𝑃7 𝑃8 𝑃9
𝑃10𝑃11
Initial Active Edge
View Point𝑃𝑣
Visible Edge formed by closest visible endpoint of object from
Viewpoint
After determining initial
active edge
Angularly Ascending Sorted
Order: 𝑃2, 𝑃3 , 𝑃9,…..
𝑃𝑜 𝑃3,
Initial Active Edge𝑃𝑜 𝑃3
An Easier Approach to Visible Edge Determination from Moving Viewpoint 8/18
Our Approach
First Case
𝑃𝑣
𝑃0 𝑃1
𝑃2
𝑃3
𝑃4
If the endpoint of an object is situated behind the active
edge
If the active edge is 𝑃0 𝑃1 ; 𝑃2 is encountered according to the
angularly sorted order.
As 𝑃2 is situated behind the active edge 𝑃0 𝑃1 , 𝑃2 is Discarded.
Similar is the case with 𝑃4
𝑃4
An Easier Approach to Visible Edge Determination from Moving Viewpoint 9/18
Our Approach(contd.)
Second Case
𝑃𝑣
𝑃0 𝑃1
𝑃2𝑃3
𝑃4
If an endpoint of an object is situated in front of the active
edge
𝑃𝑣 𝑃4 is extended which intersects 𝑃1 𝑃0 in point 𝑃𝑛, 𝑃1 𝑃𝑛 & 𝑃𝑛 𝑃4 are
inserted into visible edge list and 𝑃4 𝑃5 is considered as the new active
edge.
𝑃5
𝑃6
If the active edge is 𝑃1 𝑃0 and 𝑃4 is considered according to the
angularly sorted order , then the second case arises because 𝑃4 is
in front of 𝑃1 𝑃0.
𝑃𝑛𝑃7
An Easier Approach to Visible Edge Determination from Moving Viewpoint 10/18
Our Approach(contd.)
Third Case If an endpoint of an object is the other end of the active
edge
𝑃𝑣
𝑃0
𝑃1
𝑃2𝑃3
𝑃4𝑃5
𝑃6
𝑃𝑛𝑃7
If active edge 𝑃4 𝑃5 ; 𝑃5 is encountered according to the angularly
sorted order, then the third case arises because, 𝑃5 is the other end of
the active edge 𝑃4 𝑃5.
𝑃5
𝑃𝑣 𝑃5 is extended to infinity ; if this extension line intersects an object
edge, then active & visible edge list is updated.
An Easier Approach to Visible Edge Determination from Moving Viewpoint 11/18
Proposed Algorithm
Algorithm: DETERMINE_VISIBLE_EDGE(point Pv)
Input : A set of vertices of polygonal objects
Output : A set of visible edge or an unbounded visible region
1.1: Sort angularly all end points around Pv
1.2: Determine the initial active edge
1.3: for all points Pi in the sorted list
1.4: if Pi is behind the active edge then
1.5: Update nothing
1.6: else if Pi is in front of the active edge then
1.7: Update visible edge list and active
edge accordingly
1.8: else if Pi is the other end of active edge
then
1.9: Update visible edge list and active
edge accordingly
1.10: end if
1.11: end for
𝑃𝑣
𝑃1
𝑃10
𝑃2
𝑃3
𝑃5
𝑃6𝑃7
𝑃8
𝑃9
𝑃4
𝑃11
𝑃12
𝑃13
𝑃11
𝑃14
𝑃15 𝑃16
𝑃17𝑃18
𝑃0𝑃0
𝑃3 𝑃2
An Easier Approach to Visible Edge Determination from Moving Viewpoint 12/18
Time Complexity Analysis
Algorithm: DETERMINE_VISIBLE_EDGE(point Pv)
Input : A set of vertices of polygonal objects
Output : A set of visible edge or an unbounded visible region
1.1: Sort angularly all end points around Pv
1.2: Determine the initial active edge
1.3: for all points Pi in the sorted list
1.4: if Pi is behind the active edge then
1.5: Update nothing
1.6: else if Pi is in front of the active edge then
1.7: Update visible edge list and active
edge accordingly
1.8: else if Pi is in the other end of active edge
then
1.9: Update visible edge list and active
edge accordingly
1.10: end if
1.11: end for
O(𝒏 𝒍𝒐𝒈𝒏)
O(𝒏)
𝐎(n)
𝐎(n)
𝐎(𝒏2)
In Worst Case
O( 𝒏 𝟐)
An Easier Approach to Visible Edge Determination from Moving Viewpoint 13/18
Optimization for Moving Viewpoint
Modifying Angularly Sorted Order
P comes before R when they are sorted angularly around O’ and
P comes after R when they are sorted angularly around O.
This is due to the fact that the straight line connecting P and R
intersects the line segment OO’.
So if we pre-calculate all intersection points between O(n2) lines
and the straight line along which we move the viewpoint, we can
determine which pairs to swap in the angularly sorted list in a
straight forward manner.
P
R
O O’
An Easier Approach to Visible Edge Determination from Moving Viewpoint 14/18
Optimization for Moving Viewpoint
Improving Intersection Point Determination
We pre-calculate the angular span of each obstacle by
considering two oblique tangents between the obstacle and the
straight line segment along which we move the viewpoint.
We can use a segment tree to store all the angular spans which
allows us to determine all the candidate intersecting obstacles of
an extension line in logarithmic time.
𝑶
𝑎
𝑏
Angular Span of O is [ 𝑎, 𝑏 ]
An Easier Approach to Visible Edge Determination from Moving Viewpoint 15/18
Implementation Details
C++ Language
& OpenGL API
Input:
Simple axis aligned
rectangles as
obstacles in .txt file
Output:
Visible edge or Visible
Unbounded Region from
Moving Viewpoint in
different position inside a
2D space
An Easier Approach to Visible Edge Determination from Moving Viewpoint 16/18
Performance Analysis
No. Number of
Obstacles
Running
Time(msecs)
1. 1000 22
2. 2000 42
3. 3000 70
4. 4000 96
5. 5000 130
6. 6000 161
7. 7000 200
8. 8000 241
9. 9000 298
10 10000 365
The Running times of the initial run of the algorithm around
the first viewpoint has been calculated for randomly
generated 1000 to 10000 obstacles.
0
50
100
150
200
250
300
350
400
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
RuningTime(msecs)
Number of Obstacles
Performance Analysis
Running
Time(mili
seconds)
Per
Thousand
Obstacles
An Easier Approach to Visible Edge Determination from Moving Viewpoint 17/18
An Easier and less complicated algorithm is
proposed for determining visible edge so to say
unbounded visible region from moving viewpoint.
Further modification of this algorithm can be
made to determine the visible surface from
moving perspective in 3D space also with better
time complexity.
Optimization of the algorithm for moving viewpoint
is expected to perform far better than the worst
case time complexity.
Conclusions
An Easier Approach to Visible Edge Determination from Moving Viewpoint 18/18
Any Question or
Suggestion is Welcome
iCEEiCT
April 11, 2014

More Related Content

Similar to An Easier Approach to Visible Edge Determination from Moving Viewpoint, Paper Presentation @ICEEiCT2014, Dhaka

Robotics: Forward and Inverse Kinematics
Robotics: Forward and Inverse KinematicsRobotics: Forward and Inverse Kinematics
Robotics: Forward and Inverse Kinematics
Damian T. Gordon
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
avelraj
 

Similar to An Easier Approach to Visible Edge Determination from Moving Viewpoint, Paper Presentation @ICEEiCT2014, Dhaka (20)

Unit 4 notes
Unit 4 notesUnit 4 notes
Unit 4 notes
 
Clipping computer graphics
Clipping  computer graphicsClipping  computer graphics
Clipping computer graphics
 
Clipping
ClippingClipping
Clipping
 
Circle & curve clipping algorithm
Circle & curve clipping algorithmCircle & curve clipping algorithm
Circle & curve clipping algorithm
 
Robotics: Forward and Inverse Kinematics
Robotics: Forward and Inverse KinematicsRobotics: Forward and Inverse Kinematics
Robotics: Forward and Inverse Kinematics
 
Clipping
ClippingClipping
Clipping
 
Two Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image ProcessingTwo Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image Processing
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iii
 
Unit 3 visual realism
Unit 3 visual realismUnit 3 visual realism
Unit 3 visual realism
 
Unit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdfUnit-IV Windowing and Clipping.pdf
Unit-IV Windowing and Clipping.pdf
 
99995327.ppt
99995327.ppt99995327.ppt
99995327.ppt
 
UNIT-III
UNIT-IIIUNIT-III
UNIT-III
 
A Discrete Optimization Approach for SVD Best Truncation Choice based on ROC ...
A Discrete Optimization Approach for SVD Best Truncation Choice based on ROC ...A Discrete Optimization Approach for SVD Best Truncation Choice based on ROC ...
A Discrete Optimization Approach for SVD Best Truncation Choice based on ROC ...
 
ROBUST MULTISENSOR FRAMEWORK FOR MOBILE ROBOT NAVIGATION IN GNSS-DENIED ENVIR...
ROBUST MULTISENSOR FRAMEWORK FOR MOBILE ROBOT NAVIGATION IN GNSS-DENIED ENVIR...ROBUST MULTISENSOR FRAMEWORK FOR MOBILE ROBOT NAVIGATION IN GNSS-DENIED ENVIR...
ROBUST MULTISENSOR FRAMEWORK FOR MOBILE ROBOT NAVIGATION IN GNSS-DENIED ENVIR...
 
A navigation mesh_for_dynamic_environments
A navigation mesh_for_dynamic_environmentsA navigation mesh_for_dynamic_environments
A navigation mesh_for_dynamic_environments
 
UNIT2.pptx
UNIT2.pptxUNIT2.pptx
UNIT2.pptx
 
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygonsLiang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
Liang- Barsky Algorithm, Polygon clipping & pipeline clipping of polygons
 
Lecture 2d point,curve,text,line clipping
Lecture   2d point,curve,text,line clippingLecture   2d point,curve,text,line clipping
Lecture 2d point,curve,text,line clipping
 
3D Analyst Lab 1
3D Analyst Lab 13D Analyst Lab 1
3D Analyst Lab 1
 
Visual odometry & slam utilizing indoor structured environments
Visual odometry & slam utilizing indoor structured environmentsVisual odometry & slam utilizing indoor structured environments
Visual odometry & slam utilizing indoor structured environments
 

More from shibbirtanvin

More from shibbirtanvin (8)

4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
Determininstic rounding of linear programs
Determininstic rounding of linear programsDetermininstic rounding of linear programs
Determininstic rounding of linear programs
 
Thesis summary knowledge discovery from academic data using association rule...
Thesis summary  knowledge discovery from academic data using association rule...Thesis summary  knowledge discovery from academic data using association rule...
Thesis summary knowledge discovery from academic data using association rule...
 
Final thesis_Knowledge Discovery from Academic Data using Association Rule Mi...
Final thesis_Knowledge Discovery from Academic Data using Association Rule Mi...Final thesis_Knowledge Discovery from Academic Data using Association Rule Mi...
Final thesis_Knowledge Discovery from Academic Data using Association Rule Mi...
 
Preprocessing of Academic Data for Mining Association Rule, Presentation @WAD...
Preprocessing of Academic Data for Mining Association Rule, Presentation @WAD...Preprocessing of Academic Data for Mining Association Rule, Presentation @WAD...
Preprocessing of Academic Data for Mining Association Rule, Presentation @WAD...
 
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
 
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
Mining the Social Web to Analyze the Impact of Social Media on Socialization,...
 
Knowledge Discovery from Academic Data using Association Rule Mining, Paper P...
Knowledge Discovery from Academic Data using Association Rule Mining, Paper P...Knowledge Discovery from Academic Data using Association Rule Mining, Paper P...
Knowledge Discovery from Academic Data using Association Rule Mining, Paper P...
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 

An Easier Approach to Visible Edge Determination from Moving Viewpoint, Paper Presentation @ICEEiCT2014, Dhaka

  • 1. An Easier Approach to Visible Edge Determination from Moving Viewpoint Shibbir Ahmed (Presenter) Friday, April 11, 2014
  • 2. An Easier Approach to Visible Edge Determination from Moving Viewpoint 2/18 Outline Problem Statement Background Motivation Preliminaries Our Approach Proposed Algorithm Optimization in case of Moving Viewpoint Implementation Details & Performance Analysis
  • 3. An Easier Approach to Visible Edge Determination from Moving Viewpoint 3/18 Problem Statement Viewpoint Obstacles Unbounded Visible Region ViewpointMoving Viewpoint Input Output
  • 4. An Easier Approach to Visible Edge Determination from Moving Viewpoint 4/18 Background 1963 ; Back-face Culling is used𝑅𝑜𝑏𝑒𝑟𝑡′ 𝑠 Algorithm 𝐴𝑝𝑝𝑙𝑒′s Algorithm 1967; Polygon instead of Polyhedron 𝑃𝑎𝑖𝑛𝑡𝑒𝑟′s Algorithm Render polygons from back to front, ‘painting over’ previous polygons 𝑧𝐵uffer Algorithm Polygons are scan converted in arbitrary order. When pixels overlap, Intensity & Depth buffer is used to decide which polygon gets that pixel 𝐵𝑆𝑃 Tree Split a line to apply Divide & Conquer in spatial subdivision; process front & back sub-tree recursively 𝑆𝑐𝑎n𝑙𝑖𝑛𝑒 Algorithm Render scene scan line for image precision by maintaining various lists of tables of edge, active edge, polygon, active polygon
  • 5. An Easier Approach to Visible Edge Determination from Moving Viewpoint 5/18 Motivation Less complicated approach; can be easily implemented Determines Visible Regions besides visible edges Same approach applicable for Moving Viewpoint i.e., easier incremental approach for the problem Optimization of algorithm for moving viewpoint ensures better time complexity
  • 6. An Easier Approach to Visible Edge Determination from Moving Viewpoint 6/18 Preliminaries Object Edge Edge of simple rectangular objects which may or may not be visible from a particular viewpoint Active Edge Always an Object Edge ; At any point throughout the run of the algorithm, there is always a single active edge which is updated time to time Extension Line Lines drawn from endpoint of objects to detect new active edge (in case of intersection) or visible Unbounded region (in case of infinite Extension Line) Extension Line Object Edge Viewpoint Object Edge Extension Line Visible Edge
  • 7. An Easier Approach to Visible Edge Determination from Moving Viewpoint 7/18 Preliminaries (contd.) Object Endpoints Total number of endpoints 𝑛 Closest endpoint from 𝑃𝑣𝑃𝑜 𝑃0, 𝑃1, 𝑃2, 𝑃3, 𝑃4, … … … , 𝑃𝑛 𝑃𝑣 𝑃0 𝑃1 𝑃2𝑃3 𝑃4 𝑃5 𝑃6𝑃7 𝑃8 𝑃9 𝑃10𝑃11 Initial Active Edge View Point𝑃𝑣 Visible Edge formed by closest visible endpoint of object from Viewpoint After determining initial active edge Angularly Ascending Sorted Order: 𝑃2, 𝑃3 , 𝑃9,….. 𝑃𝑜 𝑃3, Initial Active Edge𝑃𝑜 𝑃3
  • 8. An Easier Approach to Visible Edge Determination from Moving Viewpoint 8/18 Our Approach First Case 𝑃𝑣 𝑃0 𝑃1 𝑃2 𝑃3 𝑃4 If the endpoint of an object is situated behind the active edge If the active edge is 𝑃0 𝑃1 ; 𝑃2 is encountered according to the angularly sorted order. As 𝑃2 is situated behind the active edge 𝑃0 𝑃1 , 𝑃2 is Discarded. Similar is the case with 𝑃4 𝑃4
  • 9. An Easier Approach to Visible Edge Determination from Moving Viewpoint 9/18 Our Approach(contd.) Second Case 𝑃𝑣 𝑃0 𝑃1 𝑃2𝑃3 𝑃4 If an endpoint of an object is situated in front of the active edge 𝑃𝑣 𝑃4 is extended which intersects 𝑃1 𝑃0 in point 𝑃𝑛, 𝑃1 𝑃𝑛 & 𝑃𝑛 𝑃4 are inserted into visible edge list and 𝑃4 𝑃5 is considered as the new active edge. 𝑃5 𝑃6 If the active edge is 𝑃1 𝑃0 and 𝑃4 is considered according to the angularly sorted order , then the second case arises because 𝑃4 is in front of 𝑃1 𝑃0. 𝑃𝑛𝑃7
  • 10. An Easier Approach to Visible Edge Determination from Moving Viewpoint 10/18 Our Approach(contd.) Third Case If an endpoint of an object is the other end of the active edge 𝑃𝑣 𝑃0 𝑃1 𝑃2𝑃3 𝑃4𝑃5 𝑃6 𝑃𝑛𝑃7 If active edge 𝑃4 𝑃5 ; 𝑃5 is encountered according to the angularly sorted order, then the third case arises because, 𝑃5 is the other end of the active edge 𝑃4 𝑃5. 𝑃5 𝑃𝑣 𝑃5 is extended to infinity ; if this extension line intersects an object edge, then active & visible edge list is updated.
  • 11. An Easier Approach to Visible Edge Determination from Moving Viewpoint 11/18 Proposed Algorithm Algorithm: DETERMINE_VISIBLE_EDGE(point Pv) Input : A set of vertices of polygonal objects Output : A set of visible edge or an unbounded visible region 1.1: Sort angularly all end points around Pv 1.2: Determine the initial active edge 1.3: for all points Pi in the sorted list 1.4: if Pi is behind the active edge then 1.5: Update nothing 1.6: else if Pi is in front of the active edge then 1.7: Update visible edge list and active edge accordingly 1.8: else if Pi is the other end of active edge then 1.9: Update visible edge list and active edge accordingly 1.10: end if 1.11: end for 𝑃𝑣 𝑃1 𝑃10 𝑃2 𝑃3 𝑃5 𝑃6𝑃7 𝑃8 𝑃9 𝑃4 𝑃11 𝑃12 𝑃13 𝑃11 𝑃14 𝑃15 𝑃16 𝑃17𝑃18 𝑃0𝑃0 𝑃3 𝑃2
  • 12. An Easier Approach to Visible Edge Determination from Moving Viewpoint 12/18 Time Complexity Analysis Algorithm: DETERMINE_VISIBLE_EDGE(point Pv) Input : A set of vertices of polygonal objects Output : A set of visible edge or an unbounded visible region 1.1: Sort angularly all end points around Pv 1.2: Determine the initial active edge 1.3: for all points Pi in the sorted list 1.4: if Pi is behind the active edge then 1.5: Update nothing 1.6: else if Pi is in front of the active edge then 1.7: Update visible edge list and active edge accordingly 1.8: else if Pi is in the other end of active edge then 1.9: Update visible edge list and active edge accordingly 1.10: end if 1.11: end for O(𝒏 𝒍𝒐𝒈𝒏) O(𝒏) 𝐎(n) 𝐎(n) 𝐎(𝒏2) In Worst Case O( 𝒏 𝟐)
  • 13. An Easier Approach to Visible Edge Determination from Moving Viewpoint 13/18 Optimization for Moving Viewpoint Modifying Angularly Sorted Order P comes before R when they are sorted angularly around O’ and P comes after R when they are sorted angularly around O. This is due to the fact that the straight line connecting P and R intersects the line segment OO’. So if we pre-calculate all intersection points between O(n2) lines and the straight line along which we move the viewpoint, we can determine which pairs to swap in the angularly sorted list in a straight forward manner. P R O O’
  • 14. An Easier Approach to Visible Edge Determination from Moving Viewpoint 14/18 Optimization for Moving Viewpoint Improving Intersection Point Determination We pre-calculate the angular span of each obstacle by considering two oblique tangents between the obstacle and the straight line segment along which we move the viewpoint. We can use a segment tree to store all the angular spans which allows us to determine all the candidate intersecting obstacles of an extension line in logarithmic time. 𝑶 𝑎 𝑏 Angular Span of O is [ 𝑎, 𝑏 ]
  • 15. An Easier Approach to Visible Edge Determination from Moving Viewpoint 15/18 Implementation Details C++ Language & OpenGL API Input: Simple axis aligned rectangles as obstacles in .txt file Output: Visible edge or Visible Unbounded Region from Moving Viewpoint in different position inside a 2D space
  • 16. An Easier Approach to Visible Edge Determination from Moving Viewpoint 16/18 Performance Analysis No. Number of Obstacles Running Time(msecs) 1. 1000 22 2. 2000 42 3. 3000 70 4. 4000 96 5. 5000 130 6. 6000 161 7. 7000 200 8. 8000 241 9. 9000 298 10 10000 365 The Running times of the initial run of the algorithm around the first viewpoint has been calculated for randomly generated 1000 to 10000 obstacles. 0 50 100 150 200 250 300 350 400 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 RuningTime(msecs) Number of Obstacles Performance Analysis Running Time(mili seconds) Per Thousand Obstacles
  • 17. An Easier Approach to Visible Edge Determination from Moving Viewpoint 17/18 An Easier and less complicated algorithm is proposed for determining visible edge so to say unbounded visible region from moving viewpoint. Further modification of this algorithm can be made to determine the visible surface from moving perspective in 3D space also with better time complexity. Optimization of the algorithm for moving viewpoint is expected to perform far better than the worst case time complexity. Conclusions
  • 18. An Easier Approach to Visible Edge Determination from Moving Viewpoint 18/18 Any Question or Suggestion is Welcome iCEEiCT April 11, 2014