SlideShare a Scribd company logo
Presented to: Presented by:
Prof.Nilesh Kumar Patel Shiwangi Yadav
(142107)
 Convex Set.
 Convex Hull.
 Algorithms to computing convex hull.
 Brute Force Algorithm
 Quick Hull
 Merge Hull
 Grahams scan
 Jarvis march
 Applications.
 Questions?
 X ⊆ R² satisfy the following properties
for any two points p,qϵX.
 The convex linear combination or the entire
segment p,q ⊂X,where p and q are two vector
points.
 A polygon P is said to be convex if:
- P is non intersecting;and
- For any two points p and q on the boundary
of P, segment pq lies entirely inside P.
convex
nonconvex
 Convex hull is defined as a set of given object
 Convex hull of a set Q of points, denoted by
CH(Q)is the smallest convex polygon P for which
each points in Q is either on the boundary of P or
in its interior.
a) Brute Force Algorithm
b) Quick Hull
c) Divide and Conquer
d) Grahams scan
e) Jarvis march(Gift wrapping)
 Given a set of points P, test each line segment
to see if it makes up an edge of convex hull.
 If the rest of the points are on one side of the
segment ,the segment is on the convex hull.
 Otherwise the segment is not on the hull.
Computation time of convex hull using brute
force algoritm is O(nᶾ) :-
 O(n) complexity tests, for each of O(n²)
edges.
 In a d-dimensional space, the complexity
is O(nᵈ⁺¹)
 Quick Hull uses a divide and conquer approach.
 For all a,b,c ϵ P, the points contained in ∆abc∩P
cannot be on the convex hull.
 The initial input to the
algorithm is an
arbitrary set of points.
 Starting with the given
set of points the first
operation done is the
calculation of the two
maximal points on the
horizontal axis.
 Next the line formed by
these two points is used
to divide the set into two
different parts.
 Everything left from this
line is considered one
part, everything right of
it is considered another
one.
 Both of these parts are
processed recursively.
 To determine the next
point on the convex hull
a search for the point
with the greatest distance
from the dividing line is
done.
 This point, together with
the line start and end
point forms a triangle.
 All points inside this
triangle can not be part
of the convex hull
polygon, as they are
obviously lying in the
convex hull of the three
selected points.
 Therefore these points
can be ignored for every
further processing step.
 Having this in mind the
recursive processing can
take place again.
 Everything right of the
triangle is used as one
subset, everything left of
it as another one.
• At some point the
recursively processed
point subset does only
contain the start and end
point of the dividing line.
• If this is case this line has
to be a segment of the
searched hull polygon and
the recursion can come to
an end.
QuickHull(s)
{
//Find convex hull from the set S of n points.
Convex hull:={}
1. Find left and right most points,say A and B, and add A and B to
convex hull
2. Segment AB divides the remaining (n-2)points into 2 groups S1
and S2.
where S1 are points in S that are on the right side of the oriented
line from A to B
and S2 are points in S that are on the right side of the oriented
line from B to A
3. FindHull (S1,A,B)
4. FindHull (S2,B,A)
Findhull (Sk,P,Q)
{
//find points on convex hull from the set of points that are on the right
side of the oriented line from P to Q
If Sk has no points,
then return.
From the given set of points in Sk, find farthest point,say c, from
segment PQ
Add points C to convex hull at the location between P and Q three
points P,Q and C partition the remaining points of Sk into 3 subsets
: S0,S1,S2
Where S0 are points inside triangle PCQ, S1 are points on the right
side of the oriented line from P to C and S2 are points on the right
side of the oriented line from from C to Q.
FindHull (S1,P,C)
FindHull (S2,C,Q)
T(n)=2T(n/2)+O(n)
T(n)= (nlogn) ; Average case
T(n)=O(n²); Worst case
•Preprocessing: sort the points
by x-coordinate
•Divide the set of points into
two sets A and B:
•A contains the left n/2
points,
• B contains the right n/2
points
•Recursively compute the
convex hull of A
•Recursively compute the
convex hull of B
A B
•Preprocessing: sort the points by x-
coordinate
•Divide the set of points into two sets
A and B:
•A contains the left n/2 points,
• B contains the right n/2 points
•Recursively compute the convex
hull of A
•Recursively compute the convex
hull of B
•Merge the two convex hulls
O(n log n)
O(1)
T(n/2)
T(n/2)
O(n)
In merging hull we find upper and lower tangent of CH1 and
CH2
Find the Upper Tangent:
 Start at the rightmost vertex of CH1 and the leftmost vertex of
CH2.
 Upper tangent will be a line segment
such that it makes a left turn with
next counter-clockwise vertex of CH1
and makes a right turn with next
clockwise vertex of CH2.
CH1 CH2
 If the line segment connecting them is not the upper
tangent:
– If the line segment does not make a left turn with
next counter clockwise vertex of CH1, rotate to the
next counter-clockwise vertex in CH1.
– Else if the line segment does not
make a right turn with the next
clockwise vertex of CH2, rotate to
the next clockwise vertex in CH2.
Repeat as necessary.
CH1 CH2
Find the Lower Tangent
 Start at the rightmost vertex of CH1 and the leftmost
vertex of CH2.
 Lower tangent will be a line segment
such that it makes a right turn with
next clockwise vertex of CH1
and makes a left turn with next
counter clockwise vertex of CH2.
CH1 CH2
 If the line segment connecting them is not the lower
tangent:
– If the line segment does not make a right turn with
next clockwise vertex of CH1, rotate to the next
clockwise vertex in CH1.
– Else if the line segment does not
make a left turn with the next
counter-clockwise vertex of CH2,
rotate to the next counter clockwise
vertex in CH2.
Repeat as necessary.
CH1 CH2
 Graham scan is a method of computing the
convex hull of a finite set of points in the plane
with time complexity O(n logn).
 The algorithm finds all vertices of the convex hull
ordered along its boundary
 Graham's scan solves the convex-hull problem by
maintaining a stack S of candidate points. Each
point of the input set Q is pushed once onto the
stack.
 And the points that are not vertices of CH(Q) are
eventually popped from the stack. When the
algorithm terminates, stack S contains exactly the
vertices of CH(Q), in counterclockwise order of their
appearance on the boundary.
 When we traverse the convex hull counter clockwise,
we should make a left turn at each vertex.
 Each time the while loop finds a vertex at which we
make a non left turn ,the vertex is popped from the
vertex.
12/2/2015 30
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 31
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 32
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 33
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 34
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 35
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 36
p0
p1
p3
p2
p4
p5
p6
p7
p8
p11
p12
p10
p9
12/2/2015 37
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
12/2/2015 38
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
12/2/2015 39
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
12/2/2015 40
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
12/2/2015 41
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
12/2/2015 42
p0
p1
p3
p2
p4
p5
p6
p7
p8
p9
p11
p12
p10
 Phase 1 takes time O(N logN) points are sorted
by angle around the anchor
 Phase 2 takes time O(N) each point is inserted
into the sequence exactly once, and each point
is removed from the sequence at most once
 Total time complexity O(N log N)
 Proposed by R.A. Jarvis in 1973
 1.Also known as the “gift wrapping” technique.
 2.Start at some extreme point on the hull.
 3.In a counterclockwise fashion, each point
within the hull is visited and the point that
undergoes the largest right-hand turn from the
current extreme point is the next point on the hull.
 4.Finds the points on the hull in the order in which
they appear.
 This is perhaps the most simple-minded algorithm for
the convex hull , and yet in some cases it can be very fast.
The basic idea is as follows:
 Start at some extreme point, which is guaranteed to be on
the hull.
 At each step, test each of the points, and find the one which
makes the largest right-hand turn. That point has to be the
next one on the hull.
 Because this process marches around the hull in counter-
clockwise order, like a ribbon wrapping itself around the
points, this algorithm also called the "gift-wrapping"
algorithm
 The corresponding convex hull algorithm is
called Jarvis’s march. Which builds the hull in
O(nh) time by a process called “gift-wrapping”.
 The algorithm operates by considering any one
point that is on the hull say, the lowest point.
 We then find the “next” edge on the hull in
counter clockwise order.
 In order to find the biggest right hand turn, the
last two points added to the hull, p1 and p2, must
be known.
 Assuming p1 and p2 are known, the angle these
two points form with the remaining possible hull
points is calculated. The point that minimizes the
angle is the next point in the hull.
 Continue to make right turns until the original
point is reached and the hull is complete.
 The idea of Jarvis’s Algorithm is simple, we start from the
leftmost point (or point with minimum x coordinate value)
and we keep wrapping points in counter clockwise direction.
 The big question is, given a point p as current point, how to
find the next point in output?
 The idea is to use orientation()here. Next point is selected as
the point that beats all other points at counter clockwise
orientation, and the point which has right hand most turn is
taken as next point.
Algorithm
First, a base point po is selected, this is the point
with the minimum y-coordinate
Select leftmost point in case of tie.
The next convex hull vertices p1 has the least polar
angle w.r.t. the positive horizontal ray from po.
Measure in counter clockwise direction.
If tie, choose the farthest such point.
Vertices p2, p3, . . . , pk are picked similarly until yk =
ymax
pi+1 has least polar angle w.r.t. positive ray
from po.
If tie, choose the farthest such point.
Implementation technique
 The points are stored in a fixed array of size one thousand.
 A static sized contiguous array is an appropriate data structure
because of the algorithm’s sequential and repetitious point
checking.
 Searching operations would be considerably slower assuming
non-contiguous memory allocation of nodes in a linked list.
 Using a static array makes it far more likely the data with be
brought into cache, where operations can happen considerably
faster.
Application
 Blue lines represent point-to-point comparisons. As
Jarvis’ March progresses around the convex hull,it finds
the point with the most minimal or maximal angle
relative to itself; that is the next point in the convex
hull.
 Blue lines radiate from every point in the completed
polygon. This is because the algorithm tests every point
in the set at every node in the convex hull.
 Although not visible, blue lines also show tests
between neighbor points. However, because those edges
are part of the perimeter of the convex hull, a green line
covers them.
 O(nh) complexity, with n being the total number of
points in the set, and h being the number of points
that lie in the convex hull.
 This implies that the time complexity for this
algorithm is the number of points in the set
multiplied by the number of points in the hull
 The worst case for this algorithm is denoted by
O(n2), which is not optimal.
 Favorable conditions in which to use the Jarvis
march include problems with a very low number
of total points, or a low number of points on the
convex hull in relation to the total number of
points.
 Since the algorithm spends O(n) time for each
convex hull vertex, the worst-case running time is
O(n2).
 However, if the convex hull has very few vertices,
Jarvis's march is extremely fast.
 A better way to write the running time is O(nh),
where h is the number of convex hull vertices.
 In the worst case, h = n, and we get our old O(n2)
time bound, but in the best case h = 3, and the
algorithm only needs O(n) time.
 This is a so called output-sensitive algorithm, the
smaller the output, the faster the algorithm.
 Computer visualization, ray tracing
(e.g. video games, replacement of bounding boxes)
 Path finding
(e.g. embedded AI of Mars mission rovers)
 Geographical Information Systems (GIS)
(e.g. computing accessibility maps)
 Visual pattern matching
(e.g. detecting car license plates)
 Verification methods
(e.g. bounding of Number Decision Diagrams)
 Geometry
(e.g. diameter computation)
Que1. Computation time of convex hull using brute
force algorithm is O(nᶾ):-O(n) complexity tests, for
each of O(n²) edges. Give an O(nlogn) time
complexity for computing the convex hull.
Ques2. Consider 10 points (P₀ to P₉) and then construct
a convex hull using Graham scan method.
Convex hull

More Related Content

What's hot

data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
Abinaya B
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
Mohammed Hussein
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
NagajothiN1
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.Mohd Arif
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
Nv Thejaswini
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
Melaku Bayih Demessie
 
KMP Pattern Matching algorithm
KMP Pattern Matching algorithmKMP Pattern Matching algorithm
KMP Pattern Matching algorithm
Kamal Nayan
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
Dr Shashikant Athawale
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
Md. Shafiuzzaman Hira
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
Dhrumil Panchal
 
Quick sort algorithn
Quick sort algorithnQuick sort algorithn
Quick sort algorithnKumar
 
N queen problem
N queen problemN queen problem
N queen problem
Ridhima Chowdhury
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1
Amrinder Arora
 
Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)
United International University
 
Prim's algorithm
Prim's algorithmPrim's algorithm
Prim's algorithm
Pankaj Thakur
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
Rashik Ishrak Nahian
 

What's hot (20)

Heaps
HeapsHeaps
Heaps
 
data structures- back tracking
data structures- back trackingdata structures- back tracking
data structures- back tracking
 
Turing machine by_deep
Turing machine by_deepTuring machine by_deep
Turing machine by_deep
 
Greedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack ProblemGreedy Algorithm - Knapsack Problem
Greedy Algorithm - Knapsack Problem
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
8 queen problem
8 queen problem8 queen problem
8 queen problem
 
Circle drawing algo.
Circle drawing algo.Circle drawing algo.
Circle drawing algo.
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
KMP Pattern Matching algorithm
KMP Pattern Matching algorithmKMP Pattern Matching algorithm
KMP Pattern Matching algorithm
 
Stack
StackStack
Stack
 
Divide and Conquer
Divide and ConquerDivide and Conquer
Divide and Conquer
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
Quick sort algorithn
Quick sort algorithnQuick sort algorithn
Quick sort algorithn
 
N queen problem
N queen problemN queen problem
N queen problem
 
Divide and Conquer - Part 1
Divide and Conquer - Part 1Divide and Conquer - Part 1
Divide and Conquer - Part 1
 
Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)Balanced Tree (AVL Tree & Red-Black Tree)
Balanced Tree (AVL Tree & Red-Black Tree)
 
Prim's algorithm
Prim's algorithmPrim's algorithm
Prim's algorithm
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 

Viewers also liked

An Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsAn Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsKasun Ranga Wijeweera
 
Csc406 lecture7 device independence and normalization in Computer graphics(Co...
Csc406 lecture7 device independence and normalization in Computer graphics(Co...Csc406 lecture7 device independence and normalization in Computer graphics(Co...
Csc406 lecture7 device independence and normalization in Computer graphics(Co...
Daroko blog(www.professionalbloggertricks.com)
 
Convex hulls & Chan's algorithm
Convex hulls & Chan's algorithmConvex hulls & Chan's algorithm
Convex hulls & Chan's algorithm
Alberto Parravicini
 
Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm Analysis
Rex Yuan
 
convex hull
convex hullconvex hull
convex hull
Aabid Shah
 
Cg
CgCg
Cg
google
 
Convex Optimization
Convex OptimizationConvex Optimization
Convex Optimization
adil raja
 
project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection Sumit Varshney
 
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Amrinder Arora
 
Image Processing with OpenCV
Image Processing with OpenCVImage Processing with OpenCV
Image Processing with OpenCV
debayanin
 
Linear programming graphical method (feasibility)
Linear programming   graphical method (feasibility)Linear programming   graphical method (feasibility)
Linear programming graphical method (feasibility)
Rajesh Timane, PhD
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingJohn Williams
 
Hand gesture recognition
Hand gesture recognitionHand gesture recognition
Hand gesture recognition
Muhammed M. Mekki
 
Gesture recognition
Gesture recognitionGesture recognition
Gesture recognition
PrachiWadekar
 
Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical MethodJoseph Konnully
 

Viewers also liked (18)

An Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsAn Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of Points
 
Csc406 lecture7 device independence and normalization in Computer graphics(Co...
Csc406 lecture7 device independence and normalization in Computer graphics(Co...Csc406 lecture7 device independence and normalization in Computer graphics(Co...
Csc406 lecture7 device independence and normalization in Computer graphics(Co...
 
Convex Hull Algorithms
Convex Hull AlgorithmsConvex Hull Algorithms
Convex Hull Algorithms
 
Vector Tools
Vector ToolsVector Tools
Vector Tools
 
Convex hulls & Chan's algorithm
Convex hulls & Chan's algorithmConvex hulls & Chan's algorithm
Convex hulls & Chan's algorithm
 
Convex Hull Algorithm Analysis
Convex Hull Algorithm AnalysisConvex Hull Algorithm Analysis
Convex Hull Algorithm Analysis
 
convex hull
convex hullconvex hull
convex hull
 
Cg
CgCg
Cg
 
Convex Optimization
Convex OptimizationConvex Optimization
Convex Optimization
 
project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection project presentation on mouse simulation using finger tip detection
project presentation on mouse simulation using finger tip detection
 
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
Convex Hull - Chan's Algorithm O(n log h) - Presentation by Yitian Huang and ...
 
Image Processing with OpenCV
Image Processing with OpenCVImage Processing with OpenCV
Image Processing with OpenCV
 
Unit 33 Optics
Unit 33   OpticsUnit 33   Optics
Unit 33 Optics
 
Linear programming graphical method (feasibility)
Linear programming   graphical method (feasibility)Linear programming   graphical method (feasibility)
Linear programming graphical method (feasibility)
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Hand gesture recognition
Hand gesture recognitionHand gesture recognition
Hand gesture recognition
 
Gesture recognition
Gesture recognitionGesture recognition
Gesture recognition
 
Linear programming - Model formulation, Graphical Method
Linear programming  - Model formulation, Graphical MethodLinear programming  - Model formulation, Graphical Method
Linear programming - Model formulation, Graphical Method
 

Similar to Convex hull

Unit ii divide and conquer -4
Unit ii divide and conquer -4Unit ii divide and conquer -4
Unit ii divide and conquer -4
subhashchandra197
 
A Tutorial on Computational Geometry
A Tutorial on Computational GeometryA Tutorial on Computational Geometry
A Tutorial on Computational Geometry
Minh-Tri Pham
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
Edhole.com
 
6869212.ppt
6869212.ppt6869212.ppt
6869212.ppt
SubhiAshour1
 
Trigonometric Function of General Angles Lecture
Trigonometric Function of General Angles LectureTrigonometric Function of General Angles Lecture
Trigonometric Function of General Angles Lecture
Froyd Wess
 
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
Shanmuganathan C
 
Geometric algorithms
Geometric algorithmsGeometric algorithms
Geometric algorithms
Ganesh Solanke
 
root locus 1.pdf
root locus 1.pdfroot locus 1.pdf
root locus 1.pdf
MarkHark1
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
Krysleng Lynlyn
 
TRAVERSE in land surveying and technique
TRAVERSE in land surveying and techniqueTRAVERSE in land surveying and technique
TRAVERSE in land surveying and technique
zaphenathpaneah1
 
26 Computational Geometry
26 Computational Geometry26 Computational Geometry
26 Computational Geometry
Andres Mendez-Vazquez
 
26 Computational Geometry
26 Computational Geometry26 Computational Geometry
26 Computational Geometry
Andres Mendez-Vazquez
 
Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesJessica Garcia
 
Transformaciones de Coordenadas
Transformaciones de Coordenadas Transformaciones de Coordenadas
Transformaciones de Coordenadas
NorgelisOberto
 
Root Locus Plot
Root Locus Plot Root Locus Plot
Root Locus Plot
Hussain K
 
BT631-14-X-Ray_Crystallography_Crystal_Symmetry
BT631-14-X-Ray_Crystallography_Crystal_SymmetryBT631-14-X-Ray_Crystallography_Crystal_Symmetry
BT631-14-X-Ray_Crystallography_Crystal_SymmetryRajesh G
 
Conservación del momento angular
Conservación del momento angularConservación del momento angular
Conservación del momento angular
jolopezpla
 
circular-functions.pptx
circular-functions.pptxcircular-functions.pptx
circular-functions.pptx
CjIgcasenza
 
ARO309 - Astronautics and Spacecraft Design
ARO309 - Astronautics and Spacecraft DesignARO309 - Astronautics and Spacecraft Design
ARO309 - Astronautics and Spacecraft Design
antony829334
 

Similar to Convex hull (20)

Unit ii divide and conquer -4
Unit ii divide and conquer -4Unit ii divide and conquer -4
Unit ii divide and conquer -4
 
A Tutorial on Computational Geometry
A Tutorial on Computational GeometryA Tutorial on Computational Geometry
A Tutorial on Computational Geometry
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
6869212.ppt
6869212.ppt6869212.ppt
6869212.ppt
 
Trigonometric Function of General Angles Lecture
Trigonometric Function of General Angles LectureTrigonometric Function of General Angles Lecture
Trigonometric Function of General Angles Lecture
 
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
convexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHullsconvexHulls
 
Geometric algorithms
Geometric algorithmsGeometric algorithms
Geometric algorithms
 
root locus 1.pdf
root locus 1.pdfroot locus 1.pdf
root locus 1.pdf
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
 
TRAVERSE in land surveying and technique
TRAVERSE in land surveying and techniqueTRAVERSE in land surveying and technique
TRAVERSE in land surveying and technique
 
26 Computational Geometry
26 Computational Geometry26 Computational Geometry
26 Computational Geometry
 
26 Computational Geometry
26 Computational Geometry26 Computational Geometry
26 Computational Geometry
 
Control chap7
Control chap7Control chap7
Control chap7
 
Trigonometry functions of general angles reference angles
Trigonometry functions of general angles reference anglesTrigonometry functions of general angles reference angles
Trigonometry functions of general angles reference angles
 
Transformaciones de Coordenadas
Transformaciones de Coordenadas Transformaciones de Coordenadas
Transformaciones de Coordenadas
 
Root Locus Plot
Root Locus Plot Root Locus Plot
Root Locus Plot
 
BT631-14-X-Ray_Crystallography_Crystal_Symmetry
BT631-14-X-Ray_Crystallography_Crystal_SymmetryBT631-14-X-Ray_Crystallography_Crystal_Symmetry
BT631-14-X-Ray_Crystallography_Crystal_Symmetry
 
Conservación del momento angular
Conservación del momento angularConservación del momento angular
Conservación del momento angular
 
circular-functions.pptx
circular-functions.pptxcircular-functions.pptx
circular-functions.pptx
 
ARO309 - Astronautics and Spacecraft Design
ARO309 - Astronautics and Spacecraft DesignARO309 - Astronautics and Spacecraft Design
ARO309 - Astronautics and Spacecraft Design
 

Recently uploaded

CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
itech2017
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 

Recently uploaded (20)

CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABSDESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
DESIGN AND ANALYSIS OF A CAR SHOWROOM USING E TABS
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 

Convex hull

  • 1. Presented to: Presented by: Prof.Nilesh Kumar Patel Shiwangi Yadav (142107)
  • 2.  Convex Set.  Convex Hull.  Algorithms to computing convex hull.  Brute Force Algorithm  Quick Hull  Merge Hull  Grahams scan  Jarvis march  Applications.  Questions?
  • 3.  X ⊆ R² satisfy the following properties for any two points p,qϵX.  The convex linear combination or the entire segment p,q ⊂X,where p and q are two vector points.
  • 4.  A polygon P is said to be convex if: - P is non intersecting;and - For any two points p and q on the boundary of P, segment pq lies entirely inside P. convex nonconvex
  • 5.  Convex hull is defined as a set of given object  Convex hull of a set Q of points, denoted by CH(Q)is the smallest convex polygon P for which each points in Q is either on the boundary of P or in its interior.
  • 6. a) Brute Force Algorithm b) Quick Hull c) Divide and Conquer d) Grahams scan e) Jarvis march(Gift wrapping)
  • 7.  Given a set of points P, test each line segment to see if it makes up an edge of convex hull.
  • 8.  If the rest of the points are on one side of the segment ,the segment is on the convex hull.  Otherwise the segment is not on the hull.
  • 9. Computation time of convex hull using brute force algoritm is O(nᶾ) :-  O(n) complexity tests, for each of O(n²) edges.  In a d-dimensional space, the complexity is O(nᵈ⁺¹)
  • 10.  Quick Hull uses a divide and conquer approach.  For all a,b,c ϵ P, the points contained in ∆abc∩P cannot be on the convex hull.
  • 11.  The initial input to the algorithm is an arbitrary set of points.
  • 12.  Starting with the given set of points the first operation done is the calculation of the two maximal points on the horizontal axis.
  • 13.  Next the line formed by these two points is used to divide the set into two different parts.  Everything left from this line is considered one part, everything right of it is considered another one.  Both of these parts are processed recursively.
  • 14.  To determine the next point on the convex hull a search for the point with the greatest distance from the dividing line is done.  This point, together with the line start and end point forms a triangle.
  • 15.  All points inside this triangle can not be part of the convex hull polygon, as they are obviously lying in the convex hull of the three selected points.  Therefore these points can be ignored for every further processing step.
  • 16.  Having this in mind the recursive processing can take place again.  Everything right of the triangle is used as one subset, everything left of it as another one.
  • 17. • At some point the recursively processed point subset does only contain the start and end point of the dividing line. • If this is case this line has to be a segment of the searched hull polygon and the recursion can come to an end.
  • 18. QuickHull(s) { //Find convex hull from the set S of n points. Convex hull:={} 1. Find left and right most points,say A and B, and add A and B to convex hull 2. Segment AB divides the remaining (n-2)points into 2 groups S1 and S2. where S1 are points in S that are on the right side of the oriented line from A to B and S2 are points in S that are on the right side of the oriented line from B to A 3. FindHull (S1,A,B) 4. FindHull (S2,B,A)
  • 19. Findhull (Sk,P,Q) { //find points on convex hull from the set of points that are on the right side of the oriented line from P to Q If Sk has no points, then return. From the given set of points in Sk, find farthest point,say c, from segment PQ Add points C to convex hull at the location between P and Q three points P,Q and C partition the remaining points of Sk into 3 subsets : S0,S1,S2 Where S0 are points inside triangle PCQ, S1 are points on the right side of the oriented line from P to C and S2 are points on the right side of the oriented line from from C to Q. FindHull (S1,P,C) FindHull (S2,C,Q)
  • 20. T(n)=2T(n/2)+O(n) T(n)= (nlogn) ; Average case T(n)=O(n²); Worst case
  • 21. •Preprocessing: sort the points by x-coordinate •Divide the set of points into two sets A and B: •A contains the left n/2 points, • B contains the right n/2 points •Recursively compute the convex hull of A •Recursively compute the convex hull of B A B
  • 22. •Preprocessing: sort the points by x- coordinate •Divide the set of points into two sets A and B: •A contains the left n/2 points, • B contains the right n/2 points •Recursively compute the convex hull of A •Recursively compute the convex hull of B •Merge the two convex hulls O(n log n) O(1) T(n/2) T(n/2) O(n)
  • 23. In merging hull we find upper and lower tangent of CH1 and CH2 Find the Upper Tangent:  Start at the rightmost vertex of CH1 and the leftmost vertex of CH2.  Upper tangent will be a line segment such that it makes a left turn with next counter-clockwise vertex of CH1 and makes a right turn with next clockwise vertex of CH2. CH1 CH2
  • 24.  If the line segment connecting them is not the upper tangent: – If the line segment does not make a left turn with next counter clockwise vertex of CH1, rotate to the next counter-clockwise vertex in CH1. – Else if the line segment does not make a right turn with the next clockwise vertex of CH2, rotate to the next clockwise vertex in CH2. Repeat as necessary. CH1 CH2
  • 25. Find the Lower Tangent  Start at the rightmost vertex of CH1 and the leftmost vertex of CH2.  Lower tangent will be a line segment such that it makes a right turn with next clockwise vertex of CH1 and makes a left turn with next counter clockwise vertex of CH2. CH1 CH2
  • 26.  If the line segment connecting them is not the lower tangent: – If the line segment does not make a right turn with next clockwise vertex of CH1, rotate to the next clockwise vertex in CH1. – Else if the line segment does not make a left turn with the next counter-clockwise vertex of CH2, rotate to the next counter clockwise vertex in CH2. Repeat as necessary. CH1 CH2
  • 27.  Graham scan is a method of computing the convex hull of a finite set of points in the plane with time complexity O(n logn).  The algorithm finds all vertices of the convex hull ordered along its boundary  Graham's scan solves the convex-hull problem by maintaining a stack S of candidate points. Each point of the input set Q is pushed once onto the stack.
  • 28.  And the points that are not vertices of CH(Q) are eventually popped from the stack. When the algorithm terminates, stack S contains exactly the vertices of CH(Q), in counterclockwise order of their appearance on the boundary.  When we traverse the convex hull counter clockwise, we should make a left turn at each vertex.  Each time the while loop finds a vertex at which we make a non left turn ,the vertex is popped from the vertex.
  • 29.
  • 43.  Phase 1 takes time O(N logN) points are sorted by angle around the anchor  Phase 2 takes time O(N) each point is inserted into the sequence exactly once, and each point is removed from the sequence at most once  Total time complexity O(N log N)
  • 44.  Proposed by R.A. Jarvis in 1973  1.Also known as the “gift wrapping” technique.  2.Start at some extreme point on the hull.  3.In a counterclockwise fashion, each point within the hull is visited and the point that undergoes the largest right-hand turn from the current extreme point is the next point on the hull.  4.Finds the points on the hull in the order in which they appear.
  • 45.  This is perhaps the most simple-minded algorithm for the convex hull , and yet in some cases it can be very fast. The basic idea is as follows:  Start at some extreme point, which is guaranteed to be on the hull.  At each step, test each of the points, and find the one which makes the largest right-hand turn. That point has to be the next one on the hull.  Because this process marches around the hull in counter- clockwise order, like a ribbon wrapping itself around the points, this algorithm also called the "gift-wrapping" algorithm
  • 46.
  • 47.  The corresponding convex hull algorithm is called Jarvis’s march. Which builds the hull in O(nh) time by a process called “gift-wrapping”.  The algorithm operates by considering any one point that is on the hull say, the lowest point.  We then find the “next” edge on the hull in counter clockwise order.
  • 48.  In order to find the biggest right hand turn, the last two points added to the hull, p1 and p2, must be known.  Assuming p1 and p2 are known, the angle these two points form with the remaining possible hull points is calculated. The point that minimizes the angle is the next point in the hull.  Continue to make right turns until the original point is reached and the hull is complete.
  • 49.
  • 50.  The idea of Jarvis’s Algorithm is simple, we start from the leftmost point (or point with minimum x coordinate value) and we keep wrapping points in counter clockwise direction.  The big question is, given a point p as current point, how to find the next point in output?  The idea is to use orientation()here. Next point is selected as the point that beats all other points at counter clockwise orientation, and the point which has right hand most turn is taken as next point.
  • 51. Algorithm First, a base point po is selected, this is the point with the minimum y-coordinate Select leftmost point in case of tie. The next convex hull vertices p1 has the least polar angle w.r.t. the positive horizontal ray from po. Measure in counter clockwise direction. If tie, choose the farthest such point. Vertices p2, p3, . . . , pk are picked similarly until yk = ymax pi+1 has least polar angle w.r.t. positive ray from po. If tie, choose the farthest such point.
  • 52. Implementation technique  The points are stored in a fixed array of size one thousand.  A static sized contiguous array is an appropriate data structure because of the algorithm’s sequential and repetitious point checking.  Searching operations would be considerably slower assuming non-contiguous memory allocation of nodes in a linked list.  Using a static array makes it far more likely the data with be brought into cache, where operations can happen considerably faster.
  • 53.
  • 54. Application  Blue lines represent point-to-point comparisons. As Jarvis’ March progresses around the convex hull,it finds the point with the most minimal or maximal angle relative to itself; that is the next point in the convex hull.  Blue lines radiate from every point in the completed polygon. This is because the algorithm tests every point in the set at every node in the convex hull.  Although not visible, blue lines also show tests between neighbor points. However, because those edges are part of the perimeter of the convex hull, a green line covers them.
  • 55.  O(nh) complexity, with n being the total number of points in the set, and h being the number of points that lie in the convex hull.  This implies that the time complexity for this algorithm is the number of points in the set multiplied by the number of points in the hull  The worst case for this algorithm is denoted by O(n2), which is not optimal.  Favorable conditions in which to use the Jarvis march include problems with a very low number of total points, or a low number of points on the convex hull in relation to the total number of points.
  • 56.  Since the algorithm spends O(n) time for each convex hull vertex, the worst-case running time is O(n2).  However, if the convex hull has very few vertices, Jarvis's march is extremely fast.  A better way to write the running time is O(nh), where h is the number of convex hull vertices.  In the worst case, h = n, and we get our old O(n2) time bound, but in the best case h = 3, and the algorithm only needs O(n) time.  This is a so called output-sensitive algorithm, the smaller the output, the faster the algorithm.
  • 57.  Computer visualization, ray tracing (e.g. video games, replacement of bounding boxes)  Path finding (e.g. embedded AI of Mars mission rovers)  Geographical Information Systems (GIS) (e.g. computing accessibility maps)  Visual pattern matching (e.g. detecting car license plates)  Verification methods (e.g. bounding of Number Decision Diagrams)  Geometry (e.g. diameter computation)
  • 58. Que1. Computation time of convex hull using brute force algorithm is O(nᶾ):-O(n) complexity tests, for each of O(n²) edges. Give an O(nlogn) time complexity for computing the convex hull. Ques2. Consider 10 points (P₀ to P₉) and then construct a convex hull using Graham scan method.