Assuming you have constructed the convex hull using scipy.spatial.ConvexHull, the returned object should then have the positions of the points, so the centroid may be as simple as, import numpy as np from scipy.spatial import ConvexHull points = np.random.rand(30, 2) # 30 random points in 2-D hull = ConvexHull(points) #Get...

image,matlab,image-processing,geometry,convex

Here is a possible approach (the principle behind the function I wrote, available on Matlab Central): I created this test image and an arbitrary point of view: testscene=zeros(500); testscene(80:120,80:120)=1; testscene(200:250,400:450)=1; testscene(380:450,200:270)=1; viewpoint=[250, 300]; imsize=size(testscene); % checks the size of the image It looks like this (the circle marks the view...

c#,wpf,computational-geometry,convex,concave-hull

I have implemented this algorithm via JavaScript, may be it will help you. There you can see function that transforms convex hull to concave hull. My implementation of the algorithm is not exactly the same as in the Paper, but it based on it. In my implementation I skipped localMaximumDistance...

c++,geometry,rounding,cgal,convex

In the end I discovered the root of this problem was the fact that the convex hull contained lots of triangles, whereas my input shapes were often cube-shaped, making each quadrilateral region appear as 2 triangles which had extremely similar plane equations, causing some sort of problem in the algorithm...

scipy,convex-optimization,convex,quadratic-programming

This is a problem in Quadratic Programming. Python - CVXOPT Matlab - quadprog ...

libgdx,polygon,triangulation,convex,concave

The problem is with your loop: // Make triangles for (int i = 0; i < pointsCoords.size / 6; i++) { trianglesVertices.add(new float[] { pointsCoords.get(i), pointsCoords.get(i+1), pointsCoords.get(i+2), pointsCoords.get(i+3), pointsCoords.get(i+4), pointsCoords.get(i+5), }); Polygon triangle = new Polygon(trianglesVertices.get(i)); triangles.add(triangle); } First triangle will have correct coordinates, but second one will will use...