polygon,computational-geometry,concave

ARRAY points := {P1, P2, ..., PN}; points.delete(middle vertices of any collinear sequence of three points); REAL p_a := index of vertex with minimum y-coordinate; REAL p_b := index of vertex with maximum y-coordinate; REAL rotated_angle := 0; REAL min_width := INFINITY; VECTOR caliper_a(1,0); // Caliper A points along...

java,gis,polygon,intersection,concave

Well I figured it out. I took the vertex list for the intersection polygon (blue), iterated through each pair of point, cast each line segment in the two original polygons as LineSegment2D objects and used the .contains method to check if each pair of points was in one of the...

python,numpy,concave,concave-hull

This is a very well known problem in image processing that can be solved using morphological operators. With that, you can use scipy's binary_fill_holes to fill the holes in your mask: >>> import numpy as np >>> from scipy.ndimage import binary_fill_holes >>> data = np.array([[1, 1, 1, 0, 0, 1,...

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...