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
3
votes
1 answer

largest volume tetrahedron in a convex polyhedron

Given a convex polyhedron, I need to find a faster algorithm for the maximum volume tetrahedron inscribed in it. I could only think of the brute force solution of O(n^4). I was thinking if we can find the farthest vertex in convex polyhedron from a…
3
votes
4 answers

Polygon Decomposition - Removing Concave Points to Form Convex Polygons

I would like to deconstruct the following polygon shown in blue removing all of the points from the polygon that cause concavity. Currently, what I have been attempting to do is: Take each point out of the polygon Test the point to see if it falls…
3
votes
1 answer

Algorithm for how to Split Large Area into Convex Polygons

I'm implementing the A* pathfinding algorithm into a grid based engine, but I'm wanting to create nodes in polygonal areas rather than just using the grid points. There will be obstacles in the area, that shouldn't be moved through. I'm wondering…
3
votes
2 answers

Polygons from network of connected points

Given an array of 2D points (#pts x 2) and an array of which points are connected to which (#bonds x 2 int array with indices of pts), how can I efficiently return an array of polygons formed from the bonds? There can be 'dangling' bonds (like in…
NPMitchell
  • 193
  • 1
  • 10
3
votes
1 answer

Algorithm to minimize sum of diagonals for triangulation of convex polygon?

Define the cost of a triangulation as the sum of the lengths of the diagonals that have been added. Given a convex polygon, what is the cost of its cheapest triangulation? If we consider the polygon as a set of n coordinates:…
3
votes
0 answers

Calculating uv texture coords for a procedurally generated polygon

I have a shape like this: and the coordinates of the points are available (Vertices have x and y components) My texture is: A simple planar UV mapping gives me: and what I desire is: How to calculate vertex positions to get the desired mapping?…
Aaron Azhari
  • 987
  • 1
  • 10
  • 24
3
votes
2 answers

Convex Hull - Determine order of the points

So I'm learning about Convex Hull Algorithms, and writing up all the algorithms from a naive Bruteforce to the Graham Scan. This is my Bruteforce O(n^4) Algorithm. In the beginning, assume all the points are part of the hull. For each triangle…
st0le
  • 33,375
  • 8
  • 89
  • 89
2
votes
0 answers

Converting triangulation to convex polygons?

I need to convert a triangulation to a set of convex polygons. A good result would have a large average polygon size and a small average deviation from the average polygon size. Is anyone aware of papers/articles/algorithms to do this? A related…
Bas Smit
  • 645
  • 1
  • 7
  • 19
2
votes
1 answer

Minkowski Sum of 3D(+) convex polygons

My goal is to obtain the representations of all faces (in the form of A[x,y,z]'>b) of a polyhedron that is the result of the convex difference between two convex polyhedra. Meaning, finding the intersection of all planes that are the result of the…
2
votes
1 answer

THREE.js Oriented Bounding Box

How do we find the oriented bounding box in three.js after computing convex hull? In the following image: Green represents convex hull (I am displaying it as mesh for visualization), white is AABB. I am aware that there are no in-built methods…
Sam
  • 207
  • 1
  • 10
2
votes
1 answer

Find AABB from many 3D planes - that form a convex hull

I have some 3D planes information. When all planes join together, it will form a 3D convex hull. Here is an example of input. Each 3D plane is denoted by a point on the plane and its normal. All normals point to inside :- - (-1,0,0) …
javaLover
  • 6,347
  • 2
  • 22
  • 67
2
votes
2 answers

Convex polygon algorithm in Cuda?

I am searching for an algorithm to find a convex polygon to contain all the random points using Cuda. Is there anyone know a very efficient algorithm that I can adapt?
Dark
  • 21
  • 2
2
votes
1 answer

What is the worst-case for gift-wapping algorithm (Jarvis’s Algorithm) to compute convex hull?

I have made a program to implement the Gift Wrapping algorithm of finding convex hull. Is there any way to generate a point set that serves as the worst case for this algorithm? How will I generate such case?
2
votes
1 answer

Box2D Cocos2d JS

I want to create a slope like in attached image in Box2D Cocos2d JS. However, I am unable to create it properly when attached sprites to it. My code is: new b2Vec2(0, 0), new b2Vec2(100 / worldScale, -50 / worldScale), new b2Vec2(200 / worldScale, 0…
Adnan Afzal
  • 167
  • 1
  • 3
  • 8
2
votes
1 answer

How to find best fit of convex polygon into other convex polygon

I'm looking for an algorithm to calculate the translation, rotation and scaling required to position a convex polygon (P1) inside another convex polygon (P2). I need it to return the "best fit", meaning P1 is completely contained within P2 and has…
Bradley Odell
  • 1,248
  • 2
  • 15
  • 28