I am using the alphaShapes2DC function from this post. It is a module which contains a Quiet operation. DelaunayMesh in a specified closed region - creating a concave hull from a set of points
I have a list containing 14 lists of 2d-points
prjs = {{{0, 1}, {1, 2}, {5, 1}}, {{2,2}}, ..., {{1, 5}, {6, 5}, {3, 5}}}
with some sublists containing only one element and some duplicates so that the alphaShapes2DC function cannot run on such sublists.
I want to create a Manipulate function to display several sublists (with their polygon) at the same time.
Manipulate[
If[Length @ prjs[[i]] > 2,
Show[
ListPlot[prjs[[i]],
Joined -> False, PlotStyle -> ColorData[97, "ColorList"][[i]]],
RegionPlot[Evaluate[alphaShapes2DC[DeleteDuplicates @ prjs[[i]], 6]],
PlotStyle -> {ColorData[97, "ColorList"][[i]], [email protected]},
BoundaryStyle -> {ColorData[97, "ColorList"][[i]], Thin},
PlotRange -> All], PlotRange -> {{-15, 10}, {-10, 10}}],
ListPlot[prjs[[i]],
Joined -> False,
PlotStyle -> ColorData[97, "ColorList"][[i]],
PlotRange -> {{-15, 10}, {-20, 20}}]],
{{i, 1}, Range @ Length @ prjs},
ContinuousAction -> True, ControlType -> TogglerBar]
Running this code first shows what I want.
But it turns bad when I click on a number in the bar — the polygon disappears.