Questions tagged [convex-polygon]

A convex polygon is a simple polygon whose interior is a convex set. In a convex polygon ,every internal angle is less than or equal to 180 degrees and every line segment between two vertices remains inside or on the boundary of the polygon.

99 questions
0
votes
0 answers

Angle base Sort Polygon Points

I was working on Scale game: Scale For this purpose, I require to sort points as per clock wise direction and I implemented algorithm for this process. Here is algorithm reference link: Sort points in clockwise order? But now this kind of situation…
Siddharth
  • 4,142
  • 9
  • 44
  • 90
0
votes
1 answer

How to apply ear clipping algorithm on a closed polygon, like a sphere?

I've been working on a project that needs to triangulate a sphere. I've known ear-clipping algorithm and know how to apply it in a non-closed polygon, like a plane. But how to triangulate a closed polygon, like a sphere?
Noah Zuo
  • 98
  • 12
0
votes
1 answer

How to find the covering polygon if I know a point all the lines around it

I have a collection of lines in my diagram and I also have a point. What I want is a collection of lines which will together form a polygon through a ordered traversal. I don't need implementation or anything all I want is someone to direct me…
0
votes
0 answers

Divide a convex polygon with holes into quadrilaterlas

How can I divide a convex polygon into quadrilaterals considering the hatched polygons (holes) already in place. Any suggestions will be greatly helpful. What am I actually trying to do is to find quadrilateral strips as two of them are shown…
Vahid
  • 5,144
  • 13
  • 70
  • 146
0
votes
1 answer

Find overlapping convex polygons

I have a set of convex polygons with a moderate number of sides (say from 4 to 30). There are a few tenths of polygons, say 100 to 1000. Most of them are isolated but a few form small groups of 2 to 10 that overlap between them. I need to…
user1196549
0
votes
0 answers

Separation of convex polygons in 2d

I am trying to find whether or not two convex polygons intersect. I read that one of the most efficient way is using The Method of Separating Axes. I found some code in this book…
0
votes
2 answers

Scalable loop over neighbours

It is well-known, that if one wants to layout square grid(aka matrix) of real numbers he can use array with row-major order. Let's draw neighbourhood of some element i: ................................... ...|i-width-1|i-width|i-width+1|... ...| …
DoctorMoisha
  • 1,613
  • 14
  • 25
0
votes
1 answer

Intersection of a convex polygon and a moving circle

I have a straight line which intersects a convex polygon in 2D plane. There exists a circle with constant radius. The center of circle is moving on this line. So at first the polygon and circle don't intersect with each other, as the circle gets…
ladan
  • 1
  • 1
0
votes
2 answers

Intersect quadrilateral with axis-aligned rectangle?

How can one efficiently test if an axis-aligned rectangle R intersects a nice quadrilateral Q? Nice means: Q is convex (not a chevron) and non-selfintersecting (not a bowtie, not degenerate). Just 2D. Just yes/no. I don't need the actual region of…
0
votes
0 answers

pointPolygonTest doesn't find any point

I want to find center of palm. Firstly,I found contours and select max area contour. And I used pointPolygonTest. My code and result image are below, but I didn't find any point using pointPolygonTest. What is the problem? double dist, maxdist =…
user2362956
0
votes
0 answers

Cut a polygon into 4 parts with equals area. java

I need to cut a convex not simple polygon by two perpendicular lines to divide it into 4 equal(area) parts. I wrote a program, but it does not pass tests. I think the reason is rounding errors or my function of calculating area. Please check it,…
punksta
  • 2,738
  • 3
  • 23
  • 41
0
votes
1 answer

Best approximation pair for two polygons/polytopes

There are two polytopes A and B in R^3 with empty intersection. The polytopes are defined by its faces, i.e. there are only inequalities for its hyperspaces and vertexes are unknown. The problem is to find points a in A and b in B such that ||a-b||…
0
votes
1 answer

Cut the Cake, or polygon decomposition

I'm facing the following problem: I'm given a set of coordinates on an integer grid that define the vertices of a polygon. The polygon is guaranteed to be convex. It's proven that such a polygon can always be cut into 4 equal area parts by 2…
Chiffa
  • 1,486
  • 2
  • 19
  • 38
0
votes
1 answer

Scattered set of 2D vertices to triangle strip

I need to draw a convex polygon, given by 6 unordered vertices. The drawing should be done using GL_TRIANGLE_STRIP, and two of the vertices are given to me at the first and last vertices. How can I re-order the vertices efficiently so I can draw the…
Yoav
  • 5,962
  • 5
  • 39
  • 61
0
votes
2 answers

How to draw an outline of a group of multiple rectangles?

I need to draw an enclosing polygon of a group of rectangles that are placed next to each other. Let's think of text fields that share at least one edge (or part of it) with at least one of the other rectangles. I can get the rectangles points…
mllm
  • 17,068
  • 15
  • 53
  • 64