The document describes an algorithm for convex partitioning of a polygon into the smallest number of convex pieces with the lowest memory consumption. The algorithm finds primary sectors by drawing line segments between reflex vertices, ensuring the segments do not intersect polygon edges or contain interior vertices. Secondary sectors are found by intersecting primary sectors. The algorithm runs in O(n3) time and O(n2) space, producing fewer convex pieces than prior algorithms with the same time complexity while using less memory. Key steps include representing the polygon, finding reflex vertices, testing intersections, and computing sector endpoints.
Determination potassium by_ammonium_acetate_extraction_method_zahid_sau_sylhetSyed Zahid Hasan
Determination_potassium_by_ammonium_acetate_extraction_method_zahid_sau_sylhet.
Some picture and data are collected from internet. procedure is in short form so that it can understand easily.
There is no shortcut of success.
Read book first.
The Yara Fertilizer Industry Handbook is a tool for analysts, investors, journalists and others who would like to understand the fertilizer industry and in particular the parts most relevant for Yara. The fertilizer industry plays a key role in feeding a growing and increasingly food quality-conscious population. The nitrogen fertilizer industry is covered in detail as this is the most important sector for Yara.
Determination potassium by_ammonium_acetate_extraction_method_zahid_sau_sylhetSyed Zahid Hasan
Determination_potassium_by_ammonium_acetate_extraction_method_zahid_sau_sylhet.
Some picture and data are collected from internet. procedure is in short form so that it can understand easily.
There is no shortcut of success.
Read book first.
The Yara Fertilizer Industry Handbook is a tool for analysts, investors, journalists and others who would like to understand the fertilizer industry and in particular the parts most relevant for Yara. The fertilizer industry plays a key role in feeding a growing and increasingly food quality-conscious population. The nitrogen fertilizer industry is covered in detail as this is the most important sector for Yara.
Philippines, Department of Agriculture, Laboratory Services DivisionExternalEvents
First lab managers’ meeting of the South-East Asia Laboratory NETwork (SEALNET 2.0) - Quality improvement in Asian soil laboratories: towards standardization and harmonization of soil analyses and their interpretation, Bogor, Indonesia, 20 - 24 November 2017.
This Presentation Elliptical Curve Cryptography give a brief explain about this topic, it will use to enrich your knowledge on this topic. Use this ppt for your reference purpose and if you have any queries you'll ask questions.
Philippines, Department of Agriculture, Laboratory Services DivisionExternalEvents
First lab managers’ meeting of the South-East Asia Laboratory NETwork (SEALNET 2.0) - Quality improvement in Asian soil laboratories: towards standardization and harmonization of soil analyses and their interpretation, Bogor, Indonesia, 20 - 24 November 2017.
This Presentation Elliptical Curve Cryptography give a brief explain about this topic, it will use to enrich your knowledge on this topic. Use this ppt for your reference purpose and if you have any queries you'll ask questions.
it contains the detail information about Dynamic programming, Knapsack problem, Forward / backward knapsack, Optimal Binary Search Tree (OBST), Traveling sales person problem(TSP) using dynamic programming
Gives a basic idea of Finite field theory and its uses in Elliptic cure cryptography. ECDLP and Diffie Helman key exchange and Elgamal Encryption with ECC.
Similar to Convex Partitioning of a Polygon into Smaller Number of Pieces with Lowest Memory Consumption (20)
This pdf is about the Schizophrenia.
For more details visit on YouTube; @SELF-EXPLANATORY;
https://www.youtube.com/channel/UCAiarMZDNhe1A3Rnpr_WkzA/videos
Thanks...!
Richard's entangled aventures in wonderlandRichard Gill
Since the loophole-free Bell experiments of 2020 and the Nobel prizes in physics of 2022, critics of Bell's work have retreated to the fortress of super-determinism. Now, super-determinism is a derogatory word - it just means "determinism". Palmer, Hance and Hossenfelder argue that quantum mechanics and determinism are not incompatible, using a sophisticated mathematical construction based on a subtle thinning of allowed states and measurements in quantum mechanics, such that what is left appears to make Bell's argument fail, without altering the empirical predictions of quantum mechanics. I think however that it is a smoke screen, and the slogan "lost in math" comes to my mind. I will discuss some other recent disproofs of Bell's theorem using the language of causality based on causal graphs. Causal thinking is also central to law and justice. I will mention surprising connections to my work on serial killer nurse cases, in particular the Dutch case of Lucia de Berk and the current UK case of Lucy Letby.
A brief information about the SCOP protein database used in bioinformatics.
The Structural Classification of Proteins (SCOP) database is a comprehensive and authoritative resource for the structural and evolutionary relationships of proteins. It provides a detailed and curated classification of protein structures, grouping them into families, superfamilies, and folds based on their structural and sequence similarities.
Multi-source connectivity as the driver of solar wind variability in the heli...Sérgio Sacani
The ambient solar wind that flls the heliosphere originates from multiple
sources in the solar corona and is highly structured. It is often described
as high-speed, relatively homogeneous, plasma streams from coronal
holes and slow-speed, highly variable, streams whose source regions are
under debate. A key goal of ESA/NASA’s Solar Orbiter mission is to identify
solar wind sources and understand what drives the complexity seen in the
heliosphere. By combining magnetic feld modelling and spectroscopic
techniques with high-resolution observations and measurements, we show
that the solar wind variability detected in situ by Solar Orbiter in March
2022 is driven by spatio-temporal changes in the magnetic connectivity to
multiple sources in the solar atmosphere. The magnetic feld footpoints
connected to the spacecraft moved from the boundaries of a coronal hole
to one active region (12961) and then across to another region (12957). This
is refected in the in situ measurements, which show the transition from fast
to highly Alfvénic then to slow solar wind that is disrupted by the arrival of
a coronal mass ejection. Our results describe solar wind variability at 0.5 au
but are applicable to near-Earth observatories.
Introduction:
RNA interference (RNAi) or Post-Transcriptional Gene Silencing (PTGS) is an important biological process for modulating eukaryotic gene expression.
It is highly conserved process of posttranscriptional gene silencing by which double stranded RNA (dsRNA) causes sequence-specific degradation of mRNA sequences.
dsRNA-induced gene silencing (RNAi) is reported in a wide range of eukaryotes ranging from worms, insects, mammals and plants.
This process mediates resistance to both endogenous parasitic and exogenous pathogenic nucleic acids, and regulates the expression of protein-coding genes.
What are small ncRNAs?
micro RNA (miRNA)
short interfering RNA (siRNA)
Properties of small non-coding RNA:
Involved in silencing mRNA transcripts.
Called “small” because they are usually only about 21-24 nucleotides long.
Synthesized by first cutting up longer precursor sequences (like the 61nt one that Lee discovered).
Silence an mRNA by base pairing with some sequence on the mRNA.
Discovery of siRNA?
The first small RNA:
In 1993 Rosalind Lee (Victor Ambros lab) was studying a non- coding gene in C. elegans, lin-4, that was involved in silencing of another gene, lin-14, at the appropriate time in the
development of the worm C. elegans.
Two small transcripts of lin-4 (22nt and 61nt) were found to be complementary to a sequence in the 3' UTR of lin-14.
Because lin-4 encoded no protein, she deduced that it must be these transcripts that are causing the silencing by RNA-RNA interactions.
Types of RNAi ( non coding RNA)
MiRNA
Length (23-25 nt)
Trans acting
Binds with target MRNA in mismatch
Translation inhibition
Si RNA
Length 21 nt.
Cis acting
Bind with target Mrna in perfect complementary sequence
Piwi-RNA
Length ; 25 to 36 nt.
Expressed in Germ Cells
Regulates trnasposomes activity
MECHANISM OF RNAI:
First the double-stranded RNA teams up with a protein complex named Dicer, which cuts the long RNA into short pieces.
Then another protein complex called RISC (RNA-induced silencing complex) discards one of the two RNA strands.
The RISC-docked, single-stranded RNA then pairs with the homologous mRNA and destroys it.
THE RISC COMPLEX:
RISC is large(>500kD) RNA multi- protein Binding complex which triggers MRNA degradation in response to MRNA
Unwinding of double stranded Si RNA by ATP independent Helicase
Active component of RISC is Ago proteins( ENDONUCLEASE) which cleave target MRNA.
DICER: endonuclease (RNase Family III)
Argonaute: Central Component of the RNA-Induced Silencing Complex (RISC)
One strand of the dsRNA produced by Dicer is retained in the RISC complex in association with Argonaute
ARGONAUTE PROTEIN :
1.PAZ(PIWI/Argonaute/ Zwille)- Recognition of target MRNA
2.PIWI (p-element induced wimpy Testis)- breaks Phosphodiester bond of mRNA.)RNAse H activity.
MiRNA:
The Double-stranded RNAs are naturally produced in eukaryotic cells during development, and they have a key role in regulating gene expression .
3. What is a Polygon?
• Let v0, v1, v2…, vn-1 be n points in the plane.
• Let e0 = v0v1, e1 = v1v2…, ei = vivi+1…, en-1 = vn-1v0 be n
segments connecting the points.
• These segments bound a polygon if and only if
1. The intersection of each pair of segments adjacent in the
cyclic ordering is the single point shared between them: ei ∩
ei+1 = vi+1, for all i = 0…, n – 1.
2. Nonadjacent segments do not intersect: ei ∩ ej = Ф, for all j
≠ i + 1.
3. None of three consecutive vertices are collinear.
Note that all index arithmetic are modulo n.
3
6. What is a Convex Polygon?
• A polygon P is called convex if x in P and y in P implies that
the segment xy is a subset of P.
• A vertex is called reflex if its internal angle is greater than π.
• Any polygon with a reflex vertex is not convex.
6
7. Triangulation of a Polygon
• Definition: The decomposition of a polygon into a set of non
overlapping triangles.
• Example:
7
8. Convex Partitioning of a Polygon
• Definition: The decomposition of a polygon into a set of non
overlapping convex pieces.
• Example:
8
9. Convex Partitioning of a Polygon…
• A partition into triangles is a special case of a partition into
convex polygons.
• However, triangulation is by no means optimal in the number
of convex pieces.
9
10. Research Problem
• Hertel Mehlhorn algorithm can partition a polygon into exact
convex pieces in O (n2) time and O (n2) space.
• Even though there are algorithms which produce smaller
number of convex pieces than the HM algorithm, they are
either less efficient or fail to produce exact convex pieces.
• A convex partitioning algorithm is proposed which produces
exact convex pieces in O (n3) time and O (n2) space.
• The proposed algorithm produces smaller number of convex
pieces than the HM algorithm and it is more efficient than the
other algorithms which produce exact convex pieces.
10
12. Convex Partitioning Algorithms
• Hertel Mehlhorn (1983): O (n2)
• Greene (1983): O (n4)
• Keil (1985): O (n3 log n)
• Chazelle (1985): O (n3)
• Lien et al. (2006): O (nr), r reflex
• Hongguang et al. (2015): O (nr), r reflex
12
13. A Diagonal of a Polygon
• If the intersection of line segment AB with ∂P is exactly the
set {A, B} and the line segment AB is nowhere exterior to the
polygon P then the line segment is called a diagonal of the
polygon.
13
14. Hertel Mehlhorn Algorithm
• Start with a triangulation of P. Remove an inessential
diagonal; repeat.
• This process can be done in O (n) time.
14
16. Related Research Paper
K. R. Wijeweera, S. R. Kodituwakku (2017), Convex
Partitioning of a Polygon into Smaller Number of Pieces
with Lowest Memory Consumption, Ceylon Journal of
Science, Volume 46 (Issue 1), pp. 55-66.
16
17. Representation of the Polygon
• The variable points stores the number of vertices of the
polygon.
• The coordinates of the vertices of the polygon are stored
using two arrays x and y.
• Then (x[i], y[i]) denotes the ith vertex of the polygon where i
= 0, 1…, (points - 1).
17
18. Finding the Lowest Vertex of the Polygon
• The function lv returns the index of the lowest vertex of the
polygon.
• The index of one particular vertex should be returned when
there are several lowest vertices.
• Lemma: Lowest vertex is always convex.
18
19. An Important Mathematical Result
• The vertices of the triangle: P1 (x1, y1), P2 (x2, y2), P3 (x3, y3).
• Let t = x1 * (y2 – y3) + x2 * (y3 – y1) + x3 * (y1 – y2).
• t = 0 ↔ (P1, P2, P3) are collinear.
• t > 0 ↔ (P1, P2, P3) are in anticlockwise order.
• t < 0 ↔ (P1, P2, P3) are in clockwise order.
19
t > 0 t < 0
20. Calculating the Sign of a Vertex
• The function tv returns the sign of value t.
• The function getWise returns the sign of the vertex by
considering its two neighboring vertices.
20
21. Finding the Reflex Vertices of the Polygon
• All the reflex vertices of the polygon should be found.
• The array reflex is used to store the state of each vertex.
• Initially each element of the array reflex is zero.
• The function setReflex sets reflex[i] to 1 if ith vertex is reflex.
• The variable min stores the index of the lowest vertex.
• If getWise(i) * getWise(min) < 0 then the ith vertex is reflex.
21
22. Two Points with respect to a Line Segment
• Suppose L is a line segment with P1 (x1, y1) and P2 (x2, y2) as
end points.
• Then P3 (x3, y3) and P4 (x4, y4) are the given two points.
• The function isTwoSides returns 1 if P3 and P4 are situated in
two sides of the extended line segment L. Otherwise it
returns 0.
• The function tv is used for this purpose.
22
23. Two Points with respect to a Line Segment…
• If tv{P1, P2, P3} * tv{P1, P2, P4} < 0 P3, P4 are on same
side of L.
• If tv{P1, P2, P3} * tv{P1, P2, P4} > 0 P3, P4 are on opposite
sides of L.
23
24. Test for X-intersection of Two Line Segments
• Suppose L1 and L2 are two line segments.
• End points of L1 are P1 (x1, y1) and P2 (x2, y2).
• End points of L2 are P3 (x3, y3) and P4 (x4, y4).
• The function isIntersect returns 1 if these line segments x-
intersect else returns 0.
24
✔ ✘ ✘
25. Test for X-intersection of Two Line Segments…
• If following two conditions are satisfied only then L1 and L2
x-intersect.
1. P3 and P4 should be in two sides of L1.
2. P1 and P2 should be in two sides of L2.
• Therefore, isTwoSides {P1, P2, P3, P4} * isTwoSides {P3, P4,
P1, P2} = 1 the two line segments x-intersect.
25
✔ ✘ ✘
26. Test whether a Given Point is inside the Polygon
• The function isInside returns 1 if the point (xc, yc) is inside
the polygon. Otherwise it returns 0.
• A horizontal line is drawn beginning from the given point.
• Count the number of cuts of the polygon by the horizontal
line.
• If the number of cuts is even The point is outside the
polygon.
• If the number of cuts is odd The point is inside the
polygon.
26
27. Test whether a Given Point is inside the Polygon...
• The function pos is used to find the position of the vertex
with index k with respect to the line y = yc.
• The function pos returns 1, 0, or -1 if the point is above the
line, on the line or below the line respectively.
27
28. Test whether a Given Point is inside the Polygon...
• If pos (yc, i) * pos (yc, j) < 0 then the edge {(x[i], y[i]), (x[j],
y[j])} x-intersects the horizontal line y = yc.
• The equation of the edge can be written as:
(y – y[i])/(x – x[i]) = (y[j] – y[i])/(x[j] – x[i]);
x = x[i] + (y – y[i]) * (x[j] – x[i])/(y[j] – y[i]);
• Let (xp, yp) be the intersection point. Then by substituting y
= yc in above equation:
xp = x[i] + (yc – y[i]) * (x[j] – x[i])/(y[j] – y[i]);
28
29. Test whether a Given Point is inside the Polygon...
• Initially variable p = 0.
• For each edge, x-intersecting the horizontal line such that xp
> xc, the value of p should be incremented by one.
• There are four special cases which should be considered for
incrementing the value of p in addition to x-intersections.
29
30. Test whether a Given Point is inside the Polygon...
• Case 1: Line y = yc is touching a vertex.
• This case does not affect the value of p.
30
31. Test whether a Given Point is inside the Polygon...
• Case 2: Line y = yc goes through a vertex.
• In this case, the value of p should be incremented by one.
31
32. Test whether a Given Point is inside the Polygon...
• Case 3: Line y = yc is touching an edge.
• This case does not affect the value of p.
32
33. Test whether a Given Point is inside the Polygon...
• Case 4: Line y = yc goes through an edge.
• In this case, the value of p should be incremented by one.
33
34. Test whether a Given Point is inside the Polygon...
• Case 1 and Case 3 do not change the value of p.
• These two cases do not cause horizontal line to go inside or
outside the polygon.
34
35. Test whether a Given Point is inside the Polygon...
• Case 2 and Case 4 increment the value of p by one.
• These two cases cause horizontal line to go inside or outside
the polygon.
35
36. Test whether a Given Point is inside the Polygon...
• Case 1 and Case 2 deal with a vertex.
• Let the index of the vertex is i.
• Check the condition (y[i] = yc AND x[i] > xc).
• Then a (= i - 1) and b (= j + 1) are the indices of the two
neighboring vertices.
• If pos (a) * pos (b) < 0 then Case 2 else Case 1.
36
37. Test whether a Given Point is inside the Polygon...
• Case 3 and Case 4 deal with an edge.
• Let i and j be the indices of the two vertices of the edge
where j = i + 1.
• Check the condition (y[j] = yc AND x[j] > xc).
• Then a (= i - 1) and b (= j + 1) are the indices of the two
neighboring vertices.
• If pos (a) * pos (b) < 0 then Case 4 else Case 3.
37
38. Test whether a Given Point is inside the Polygon...
• p is even The new point is outside the polygon.
• p is odd The new point is inside the polygon.
• Modulo operator is used.
IF (p MODULO 2 == 0)
{
RETURN 0;
}
38
39. Finding the Primary Sectors
• The convex partitioning is done by drawing line segments
inside the polygon.
• These segments are called sectors.
• These sectors are found in two stages namely primary
sectors and secondary sectors.
• This section describes the process of finding primary sectors.
39
40. Finding the Primary Sectors…
• The number of sectors are stored in variable secs which is
initially 0.
• End points of the sectors are stored in arrays.
• (sx[i], sy[i]) and (ex[i], ey[i]) denote the end points of the ith
sector.
• Finding primary sectors is done using function setSectors1.
40
41. Finding the Primary Sectors…
• All line segments joining pairs of reflex vertices are tested for
being sectors.
• Two nested for loops are used to access all possible pairs of
vertices.
• The condition reflex[i] * reflex[j] = 0 denies the situations
where at least one of the vertices are not reflex. (Use of
keyword CONTINUE)
• A line segment in which both vertices are reflex may coincide
with an edge of the polygon if both of the vertices of the edge
are reflex. (Check the condition j – i > 0)
41
42. Finding the Primary Sectors…
• The variable found is initialized to 0.
• Using another for loop, each edge of the polygon is accessed.
• Each edge is tested for x-intersection with the line segment
using function isIntersect.
• If at least one of the edges x-intersect with the line segment
then variable found would be set into 1.
42
43. Finding the Primary Sectors…
• If still the variable found is 0 then using a for loop, each
vertex is tested whether the vertex is inside the line segment.
• If the function tv returns 0 then the three points are collinear.
• Then the projections on principle axes are considered to
decide whether the given vertex is inside the line segment or
not.
Projection on x-axis, if |gradient| ≤ 1.
Projection on y-axis, if |gradient| > 1.
• If the given vertex is inside the line segment then variable
found should be set into 1.
43
44. Finding the Primary Sectors…
• If still the variable found is 0 then that means:
The line segment does not have x-intersections with any
of the edges of the polygon.
None of the vertices of the polygon are inside the line
segment.
• Now the line segment may be inside or outside the polygon.
• If the midpoint (midx, midy) of the line segment is inside the
polygon then the line segment is also inside the polygon.
• If the line segment separates the polygon into two polygons
such that the interior angles formed after separation are
convex then the line segment is added to the list of sectors.
(Use of function isUseful)
44
45. The function isUseful
• The angles a, b, c, d formed by the line segment should be
less than π for the line segment to be eligible as a sector.
45
46. The function isUseful…
• If A and B are on the same side of the extended line segment
then it cannot be a sector.
46
47. The function isUseful…
• The function isUseful returns 1 if the line segment is a sector
else returns 0.
• Here i and j represent the indices of the vertices of the line
segment.
• Initially variable t = 0.
47
48. The function isUseful…
a = (i - 1) MODULO points;
b = (i + 1) MODULO points;
IF (tv (x[i], y[i], x[j], y[j], x[a], y[a]) * tv (x[i], y[i], x[j], y[j], x[b], y[b]) > 0)
{
t = 1;
}
a = (j - 1) MODULO points;
b = (j + 1) MODULO points;
IF (tv (x[i], y[i], x[j], y[j], x[a], y[a]) * tv (x[i], y[i], x[j], y[j], x[b], y[b]) > 0)
{
t = 1;
}
48
49. The function isUseful…
• If the variable t is still 0 then function isUseful returns 1.
• If the line segment passes the isUseful test then it is added to
the list of sectors. (See function setSectors1)
reflex[i]=0;
reflex[j]=0;
sx[secs]=x[i];
sy[secs]=y[i];
ex[secs]=x[j];
ey[secs]=y[j];
secs = secs + 1;
49
50. Intersection Point of Two Straight Lines
• Any two straight lines intersect unless they are parallel.
• Let’s consider two lines L1 and L2 formed by end points {P1
(x1, y1), P2 (x2, y2)} and {P3 (x3, y3), P4 (x4, y4)} respectively.
• If L1 and L2 are not parallel then these eight coordinates are
sent to function findIntersection to compute the intersection
point (xn, yn).
50
51. Intersection Point of Two Straight Lines…
• Let’s take (m1, c1) and (m2, c2) as the (gradient, y-intercept)
of each line respectively if they exist.
• There are four different cases of these two lines.
51
52. Intersection Point of Two Straight Lines…
• Case 1; (x1 = x2; x3 = x4): This case is ignored and not
handled using the function. Only coordinates of non-parallel
lines are sent to the function.
52
53. Intersection Point of Two Straight Lines…
• Case 2; (x1 = x2; x3 ≠ x4): L1 is parallel to y-axis and L2 is
not parallel to y-axis.
• m2 = (y3 – y4)/(x3 – x4);
• c2 = y3 – m2 * x3;
• xn = x1;
• yn = m2 * xn + c2;
53
54. Intersection Point of Two Straight Lines…
• Case 3; (x1 ≠ x2; x3 = x4): L1 is not parallel to y-axis and L2
is parallel to y-axis.
• m1 = (y1 – y2)/(x1 – x2);
• c1 = y1 – m1 * x1;
• xn = x3;
• yn = m1 * xn + c1;
54
55. Intersection Point of Two Straight Lines…
• Case 4; (x1 ≠ x2; x3 ≠ x4): Both L1 and L2 are not parallel to
y-axis.
• m1 * xn + c1 = m2 * xn + c2 xn = (c2 – c1)/(m1 – m2);
• yn = m1 * xn + c1;
55
56. The Function setClosest
• The function setClosest takes two parameters i and j which
denote the indices of two end points of a given edge.
• The purpose is to find the closest point to vertex j which is
situated in the opposite side of vertex i with respect to vertex
j.
• In this example, the goal point is P1.
56
57. The Function setClosest…
• For each point (xn, yn), the function is invoked.
• The closest point is stored in coordinates (xg, yg).
• Initially variable found = 0.
• The variable found is set to 1 after first invocation of the
function.
• Here dx = x[i] – x[j] and dy = y[i] – y[j].
• Projection of the edge on principle axes:
|dx| > |dy| Projection on x-axis.
|dx| ≤ |dy| Projection on y-axis.
57
58. The Function setClosest…
• Let’s consider the projection on x-axis.
• The expression dx * (xn – x[j]) < 0 is true only for points
which are on the opposite side of vertex i with respect to
vertex j.
• If found = 0 then (xg, yg) (xn, yn).
• If found ≠ 0 then dx > 0 or dx ≤ 0 should be considered.
• If dx > 0 then xn > xg (xn, yn) is closer to vertex j than
(xg, yg). Similarly dx ≤ 0 should be handled.
• Similar mechanism can be used for projection on y-axis.
58
59. An Illustrative Example
• The indices of first two vertices are shown in example
polygon.
• The ordering of vertices is anticlockwise.
• However, the proposed algorithm works for both clockwise
and anticlockwise polygons.
59
60. An Illustrative Example…
• Find all reflex vertices of the polygon.
• Circles represent reflex vertices.
60
61. An Illustrative Example…
• The primary sectors are shown using dotted lines.
• The end vertices of a primary sector become non-reflex.
61
62. Finding the Secondary Sectors
• Finding the secondary sectors is done using the function
setSectors2.
• The i and j denote the indices of end points of an edge where
j = i + 1.
• The edges where reflex[j] = 1 are selected using condition if.
• The variable found is initially 0 and accessed inside function
setClosest.
62
63. Finding the Secondary Sectors…
• Suppose the edge is extended in ij direction to infinity.
• The extended edge may x-intersect with:
Edges of the polygon.
Sectors available in the sector list.
• In such cases, intersection points should be computed.
• Further, the extended edge may go through:
End points of the edges.
End points of the available sectors in the sector list.
63
64. Finding the Secondary Sectors…
• Out of those x-intersection points and go-through points,
the closest point to vertex j is selected. (Use of the function
setClosest)
• A new sector is added using extended edge by taking vertex j
and the closest point as its end points.
• Five FOR loops are used to do the above task.
64
65. Finding the Secondary Sectors…
• Let’s look at first FOR loop.
• The edges which x-intersect the extended edge are found
using function isTwoSides.
• The intersection points of such edges are found using
function findIntersection.
• With respect to each intersection point, the function
setClosest is invoked.
65
66. Finding the Secondary Sectors…
• Let’s look at second FOR loop.
• The polygon vertices which are on the extended edge are
found by testing co-linearity using function t.
• With respect to each such polygon vertex, the function
setClosest is invoked.
66
67. Finding the Secondary Sectors…
• Let’s look at third FOR loop.
• The available sectors which x-intersect the extended edge are
found using function isTwoSides.
• The intersection points of such sectors are found using
function findIntersection.
• With respect to each intersection point, the function
setClosest is invoked.
67
68. Finding the Secondary Sectors…
• Let’s look at fourth FOR loop.
• The available sector starting points which are on the extended
edge are found by testing co-linearity using function t.
• With respect to each such point, the function setClosest is
invoked.
68
69. Finding the Secondary Sectors…
• Let’s look at fifth FOR loop.
• The available sector ending points which are on the extended
edge are found by testing co-linearity using function t.
• With respect to each such point, the function setClosest is
invoked.
69
70. Back to the Example
• The primary sectors are shown using dotted lines.
• (2, 3), (6, 7), and (7, 8) edges create secondary sectors.
70
71. Back to the Example…
• The secondary sectors are shown in different type of dotted
lines.
• Note that the angles created are not reflex.
71
72. Comparison with Hertel Mehlhorn Algorithm
• In this example, both algorithms give same number of
partitions.
• However, the convex pieces are different.
72
73. Minimum Partitioning?
• The proposed algorithm may fail to give the minimum
number of convex pieces for some polygons.
• The previous example can be partitioned just by using four
convex pieces.
73
75. Time Complexity
• Let n be the number of vertices in the given polygon.
• It takes O (n) time to find the lowest vertex of the polygon.
• It takes O (n) time to find all reflex vertices of the polygon if
the lowest vertex is provided.
• Altogether, it takes O (n) + O (n) = O (n) time to find reflex
vertices.
• It is necessary to test line segments formed by each pair of
reflex vertices of the polygon to find primary sectors.
• It takes O (n2) time to access each pair in the worst case.
• It takes O (n) time to check whether a given line segment
intersects with each edge of the polygon.
• After finding such a non-intersecting line segment, it takes O
(n) time to check whether it is inside the polygon.
75
76. Time Complexity…
• It takes only O (1) time to check whether such an interior
non-intersecting line segment successfully contributes to
convex partitioning.
• Altogether, it takes O (n2) * {O (n) + O (n) + O (1)} = O (n3)
time to find primary sectors if the reflex vertices are
provided.
• Therefore, the time complexity of finding primary sectors is
O (n) + O (n3) = O (n3).
• Each edge of the polygon is considered to find secondary
sectors.
• It takes O (n) time to access each edge.
• A given virtually extended edge should be tested with each
edge of the polygon which takes O (n) time.
• The number of primary sectors cannot exceed O (n2).
76
77. Time Complexity…
• Therefore, it takes O (n2) time to test the virtually extended
edge with each primary sector in the worst case.
• It takes O (n) time to test the virtually extended edge with
each secondary sector in the worst case.
• It takes O (n) time to find the closest intersection point in the
worst case.
• Therefore, it takes O (n) * {O (n) + O (n) + O (n)} = O (n2)
time to find secondary sectors.
• Thus, the time complexity of the proposed algorithm is O (n3)
+ O (n2) = O (n3).
77
78. Space Complexity
• It takes n memory cells to hold x-coordinates and n memory
cells to hold y-coordinates.
• Altogether, it takes 2n memory cells to hold the input.
• Therefore, it needs O (n) space to hold the input.
• The number of candidate primary sectors cannot exceed O
(n2).
• Therefore, the space complexity of the primary sectors is O
(n2).
• Each edge is considered for candidate secondary sectors.
• Therefore, the space complexity of the secondary sectors is O
(n).
• The additional memory required is O (1).
• Therefore, the space complexity of the proposed algorithm is
O (n) + O (n2) + O (n) + O (1) = O (n2).
78
79. Number of Convex Pieces
• Number of convex pieces against Hertel Mehlhorn algorithm
was compared using twenty random polygons.
79
80. Comparison
• Hertel Mehlhorn algorithm is the fastest algorithm available
in literature.
• HM algorithm takes O (n2) time and O (n2) space.
• The proposed algorithm produces smaller number of convex
pieces than HM algorithm even though it is slower.
• Furthermore, the proposed algorithm is faster than the other
algorithms which produce exact convex pieces.
80
82. Conclusion
• The proposed convex partitioning algorithm gives smaller
number of convex pieces than the Hertel Mehlhorn algorithm
and also performs exact convex partitioning.
82