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
1
vote
1 answer

Convex Polygons, Graphics Algorithms

Q.Why are convex polygons considered a better choice for designing graphics algorithms? My A. Convex polygons are planar and easier to clip. My answer is kind of brief and I am not sure if my answer is correct, can anyone else expand or give me a…
user1014888
  • 431
  • 2
  • 7
  • 14
1
vote
4 answers

Fastest horizontal line <-> convex polygon intersection algorithm?

I need to solve a relatively simple thing -- I've got n-vertices convex 2D polygon and a horizontal (!) line with some 'y' coordinate. I need only one thing: to check if the polygon is crossed with this line (i.e. have 2 intersections) or not. The…
Miro Kropacek
  • 2,742
  • 4
  • 26
  • 41
0
votes
1 answer

Difference of simple convex and simple non-convex polygon

Given two simple polygons P and Q where P is convex but Q not, how fast can one compute the difference $P - Q$ between P and Q if P has n and Q has m vertices? One can assume that the polygons are given as list of vertices ordered in clockwise…
user695652
  • 4,105
  • 7
  • 40
  • 58
0
votes
1 answer

Subdividing a general polygon in a number of small convex polygons

I have a polygon P made of N vertices. I need an algorithm that, given P, subdivide it in a certain number of convex polygons each using at most M vertices. Ps. P is a 2D polygon. Furthermore, i can use a polygon triangulation, but i am interested…
Marco Masci
  • 818
  • 10
  • 22
0
votes
0 answers

Containment algorithms and Convex hull algorithms to check if a point is inside the d dimensional convex hull spanned by n vectors

For n of d dimension vectors, I wanted to check if a d dimension point was inside the convex hall spanned by the d dimension vectors. There are algorithms to compute the Convex hull algorithms, but they were slow, and mostly for the lower dimension.…
0
votes
0 answers

My all local cases works, but when submitting to Kattis it gives error on all except 2 cases. How can I figure it out?

The problem is PolygonGame problem: https://open.kattis.com/problems/polygongame Where we start with a convex polygon, divide it by drawing straight lines from one side to the other side of the polygon, and then find the area of the biggest part and…
Coder88
  • 1,015
  • 3
  • 10
  • 23
0
votes
0 answers

Qt : Find polygon after translate/cut process, starting from rectangle

I have a geometrical question, but if need be I mention that I use Qt so I can do some cool geometric stuff if needed, like QPolygon::intersected(QPolygon) We are on the 2D plane. Start from a base rectangle. Choose two corners, and for each corner,…
Charles
  • 988
  • 1
  • 11
  • 28
0
votes
1 answer

getting the whole border edges from the mesh in python

I am trying to create a polygon from a mesh. My idea is to get all the border edges and make a polygon.i found somewhat similar answer to mine in this question Get border edges of mesh - in winding order I tried to implement the algorithm mention…
Purple_Ad
  • 65
  • 6
0
votes
2 answers

What's the most efficient way to find the convex hull of the union of two convex polygons?

Given two convex polygons P and Q in the (x, y) plane, respectively having vertex sets {p1, ..., pa} and {q1, ..., qb} given in clockwise order (p1 is the furthest west of the furthest-north vertices of P; q1 is the furthest west of the…
Hammerite
  • 21,755
  • 6
  • 70
  • 91
0
votes
1 answer

Python Py2D - Polygon convex decomposition (Polygon.convex_decompose()) adds extra area instead of decomposing a concave face into convex faves

I am trying to decompose some concave faces into convex faces that cover the same area as the original concave face. I found a package online that should be able to do this…
0
votes
2 answers

CGAL partitioning of polygon-with-holes

I'm looking at the Partition_2 section of the manual and examples to see if CGAL can handle convex partitioning of a polygon with holes. All of the examples appear to use Polygons without any holes. Does anyone know if this is supported by any of…
jrjbertram
  • 390
  • 3
  • 10
0
votes
1 answer

How do you find the Point of Impact and Time of Impact between concave polygons and/or circles

I've got a collections of objects, each object is either a polygon or a circle, each with translation-vectors and rotation around a point. I haven't really been able to try anything yet but from some research I know that you have to split the…
stormloop
  • 1
  • 1
0
votes
1 answer

Finding equations of planes of Convex Hull in MATLAB

I am new to MATLAB. I want to find the equations of a set of planes that are part of a convex hull that I calculated using convhulln. It is a convex polyhedron. I tried to search quite a bit but couldn't find anything. Any help is…
0
votes
2 answers

Open CV Contours - Splitting concave polygon into multiple convex ones

I have the below image in a numpy array I want to separate the blocks into individual contours or any coordinate representation. I then want to transform any concave polygons into multiple convex polygons. Like this So far I've managed to…
Lewis Morris
  • 1,916
  • 2
  • 28
  • 39
0
votes
0 answers

Minimum distance between two polygons

I have worked on implementing the algorithm required for detecting minimum distance between two convex polygons P and Q, but I reached only detecting the distance between vertices, how can I detect the minimum distance when on edges of the…
Nesrin
  • 395
  • 3
  • 8