Convex-hull of a set of points X in a Euclidean space is the convex set with smallest area that contains all points of X.
Questions tagged [convex-hull]
538 questions
4
votes
4 answers
largest prefix of array of vertices that forms a convex polygon
Related to: Polygon Decomposition - Removing Concave Points to Form Convex Polygons
I am looking for an algorithm to do the following:
The input is an array of 2D points (P0…PN-1). The length N of the array varies (3 ≤ N < ∞)
For any M ≤ N there…

finnw
- 47,861
- 24
- 143
- 221
4
votes
1 answer
Maximum distance between points in a convex hull
I am solving a problem in which I need to find the maximum distance between two points on a plane (2D) .So there is an O(n^2) approach in which I calculate distance between every point in the graph . I also implemented a convex hull algorithm now my…

sid597
- 999
- 3
- 16
- 31
4
votes
1 answer
Find two most distant points in a set of points in 3D space
I need to find the diameter of the points cloud (two points with maximum distance between them) in 3-dimensional space. As a temporary solution, right now I'm just iterating through all possible pairs and comparing the distance between them, which…

Chan Kha Vu
- 9,834
- 6
- 32
- 64
4
votes
2 answers
Android Google Maps PolygonOptions not plotted from given set of coordinates
I am trying to plot a complex polygon around a route, following its steps with a given radius. To do so I drew 50-sided uniform polygons (which are practically circles) around each step (coordinate) of the route. Now I obtain a set of coordinates of…

AymanKun
- 241
- 1
- 4
- 20
4
votes
2 answers
Algorithm to order a set of points clockwise and make sure the path connecting the points is closed
I have been going about this problem in many different ways, and after a month of trying to do it on my own I think it is time for fresh eyes to take a look at it. I am trying to make an image scaling application for re-sizing 8-bit sprites and…

Jedi_Maseter_Sam
- 753
- 4
- 24
4
votes
4 answers
Is there a linear-time algorithm for finding the convex hull of a complex polygon?
I know there's a worst-case O(n log n) algorithm for finding the convex hull of a complex polygon and a worst-case O(n) algorithm for finding the convex hull of a simple polygon. Is there a worst-case O(n) algorithm for finding the convex hull of a…

Daniel Stutzbach
- 74,198
- 17
- 88
- 77
4
votes
2 answers
How can I make convex hulls of multiple group network nodes in D3.js
I am trying to make network diagram in which the nodes are grouped by a property, and in which they are bundled by group with both location (force layout) and using a convex hull. Like this but without the click to collapse/expand. That model/code…

Aaron Bramson
- 1,176
- 3
- 20
- 34
4
votes
1 answer
Polygon/contour around subset of vertices on graph (more precise than mark.groups in igraph)
Problem definition
I need to produce a number of specific graphs, and on these graphs, highlight subsets of vertices (nodes) by drawing a contour/polygon/range around or over them (see image below).
A graph may have multiple of these…

user3554004
- 1,044
- 9
- 24
4
votes
1 answer
How can I count the number of tips in an image in OpenCV?
I have a set of hiragana characters and I would like to count the number of end points/ tips the character have.
example:
input image:
desired output image:
I have tried using convex hull
code: (based on opencv tutorial here)
…

R.A.
- 101
- 7
4
votes
3 answers
Converting convex hull to binary mask
I want to generate a binary mask that has ones for all voxels inside and zeros for all voxels outside a volume. The volume is defined by the convex hull around a set of 3D coordinates (<100; some of the coordinates are inside the volume).
I can get…

Jonas
- 74,690
- 10
- 137
- 177
4
votes
1 answer
Algorithm intersecting polytope and half line
I am looking for an algorithm in R to intersect a convex polytope with a line segment. I found several post here on stack exchange for in the plane but I am wondering if this algorithms exists in higher dimensions. My google searches didn't really…

MrOperator
- 231
- 3
- 11
4
votes
1 answer
How can I find if a point lies inside or outside of ConvexHull?
I have array of points in numpy and I compute their ConvexHull by (scipy.spatial.ConvexHull not scipy.spatial.Delaunay.convex_hull), now I wanna know if I add new point to my array is this point lies inside the convexhull of the point cloud or not?…

Am1rr3zA
- 7,115
- 18
- 83
- 125
4
votes
2 answers
Smooth Convex Hull
I have started working a convex hull algorithm and was wondering what method I could employ to smooth the polygon edge. The outline of the hull is not smooth. What I would like to do is make the lines through the vertices smoother, so that they are…

beliskna
- 185
- 11
4
votes
2 answers
Convex hulls with ggbiplot
Based on the help below I tried this script for plotting PCA with Convex hulls without success, any idea how can I solve it?
library(ggbiplot)
library(plyr)
data <-read.csv("C:/Users/AAA.csv")
my.pca <- prcomp(data[,1:9] , scale. =…

wrek
- 309
- 2
- 13
4
votes
1 answer
Finding the upper (convex) hull in higher dimension (3+)
Sorry for my broken English.
I want to find the lower envelope of a plenty of linear equations.
This is mapped to the problem of finding the upper (convex) hull in its dual plane.
As I surveyed, there are a couple methods to find an upper hull, but…

Phychus
- 41
- 1