I need some help with concave shape.
I have random set of points(>300 points) with high density which i want to turn in concave shape.
The problem appears when i try to do it with one of dyn4j Decomposer.
SweepLine.decompose and Bayazit gives me exceptions
Smth like this
Code: Select all
java.lang.NullPointerException
at org.dyn4j.geometry.decompose.SweepLine.regular(SweepLine.java:258)
at org.dyn4j.geometry.decompose.SweepLine.createTriangulation(SweepLine.java:128)
at org.dyn4j.geometry.decompose.SweepLine.triangulate(SweepLine.java:79)
or this
Code: Select all
java.lang.IllegalArgumentException: A simple polygon cannot have crossing edges.
Even triangulation falls with exception.
Looks like i have "wrong" input points, right?
I beleive any cloud of points can be turned to concave polygon through maybe aplha shape method. Is dyn4j support it?
If not how can i get decomposition for my points clowd closest to alpha shape? Should i implement delaunay triangulation or this is already done in dyn4j? Any help very appreciated!