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
0
votes
1 answer
Can't understand the solution of HDU 2823
The following code snippet was taken from here. It is the solution of this problem HDU 2823.
#define eps 1e-9
double rc(point pp[],point qq[],int n,int m)
{
int q=0;
int p=0;
for(int i=0;i

rakeen
- 1,673
- 2
- 13
- 22
0
votes
1 answer
An algorithm computing the number of vertices
Let CH1 and CH2 be two convex polygons. Give an algorithm computing, in time linear with the number of vertices, the convex hull of their union justifying that it works in all the different possible cases of mutual relations between the two…

Deepinfo
- 31
- 2
0
votes
0 answers
MATLAB to Python Conversion - ConvexHull issue
Okay so I'm manually converting MATLAB to Python and I'm not able to convert certain snippets because I'm not that great at Python
The MATLAB code is as follows:
theta = [0, 90, 180];
var1 = [0 ,90, 180];
varargin = [];
spacing = [1, 1];
calib =…

Nikhil Hegde
- 341
- 1
- 3
- 15
0
votes
1 answer
Number of spatial lines
Is there a way to find out the number of continuous spatial lines in a SpatialLinesDataFrame ?
EG this would be 2 (the outer one and the inner one) :
And this would be 1 :
(Also, is there a way to get the total length of each of them ?)

François M.
- 4,027
- 11
- 30
- 81
0
votes
2 answers
opencv convexHull returns same point twice
I am try to use convexHull to set the sequence of my points. But the result is just wrong.
//image_points_queue.push_back(original_image_points);
vector image_points = {
{ 585, 543 },
{ 643, 749 },
{ 767, 501…

Tony Luo
- 110
- 1
- 9
0
votes
2 answers
getting only the outline of a scatter plot matlab
i'm trying to plot an outline of a scatter plot I have. I don't want any of the markers of the scatter only a line that outline the cloud of points and if at all possible to fill it with color. thanks!
x = linspace(0,3*pi,200);
y = cos(x) +…

user3185970
- 69
- 8
0
votes
1 answer
Computing the convex hull boundaries
I am trying to compute convex hull boundaries and points in a image. This is what I have done so far to compute the convex hull area.
In the final subplot I want to compute the convex hull points in the image and connect these points. Can anyone…

Fairy
- 29
- 2
0
votes
1 answer
read integer values from file and directly input to program
My input is like this. I have to read more than 5000 values from a file including negative and float and double values also that values are input to my jarvis march agorithm.
1
2
6
-5
8
7.32
2
3
8
-3.32
9
1.25
7
3
Code:
public static void…
0
votes
0 answers
How to add Convex hull (or ellipse) for CCA plot in R
I have a dataset with 10 communities and 4 environmental variables taken along 60 sites. The plot created CCA on vegan method. I faced the problem with building a convex hull (and ellipse) for mark community points of plot. The search a some R code…

Denis Efimov
- 115
- 1
- 6
0
votes
1 answer
How to make a convex hull covering differently sized nodes in D3
I've run across another limitation of the convex hull implementation of D3: it does not adjust to the size of the nodes. Well, I didn't expect that it would do so automatically, but this seems like a fairly standard aspect of the data…

Aaron Bramson
- 1,176
- 3
- 20
- 34
0
votes
1 answer
Matlab: what is the correct way to get the convex hull
I have a 3D array of data which shows one concave figure. I want to find all points which don't belong to the figure, but are inside the convex hull. How can I do it?
I know I should use the convhull function, but I'm not sure how (the input is an…

DailyInformation
- 1
- 1
0
votes
0 answers
Matlab: how to connect all points
I have an array of points. Some of them are set to 1 (the red points in the picture), the rest are set to zero. How can I find all points inside the polygon created by my points (all green points in the picture)?
I don't want to just display them,…

user2738748
- 1,106
- 2
- 19
- 36
0
votes
0 answers
Ascertain the pixels in a convex hull 2D
I have some pixels which representing already a convex hull, now I looking for a way to calculate these pixels to fill the convex hull.
Is there any algorithm or idea which I should look at?

dot
- 486
- 1
- 8
- 17
0
votes
1 answer
Finding convex hull using gift-wrapping algorithm
Here's the pseudocode for finding convex hull using Gift-Wrapping Algorithm:
Step 1: Given a list of points S, let the points in S be labeled s0, s1,
..., sk. Select the rightmost lowest point S. As shown in Figure 24.9a, h0
is such a point. Add h0…

Wololo
- 841
- 8
- 20
0
votes
1 answer
ConvexHull and scipy throws an error when importing in qgis
When I am trying to import ConvexHull from scipy I am getting an error.
from scipy.spatial import ConvexHull
**Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name ConvexHull**
Here what I am…
user4602735