Joining points into 3D surface
Not sure how useful will this be. Usually Standardize-d
data is giving better results.
We can also cut off parts of the surface which are distant from our data
.
rf = Nearest[Standardize@data]
sr = ListSurfacePlot3D[Standardize @ data,
BoxRatios -> 1,
MaxPlotPoints -> 100,
RegionFunction -> Function[{x, y, z},
Norm[{x, y, z} - rf[{x, y, z}][[1]]] < .2]
]
m = Mean @ data
sd = StandardDeviation @ data
Show[
Graphics3D[
GeometricTransformation[
First@sr,
TranslationTransform[m]@*ScalingTransform[sd]
]
]
,
ListPointPlot3D[{a, b}, PlotStyle -> {Red, Blue} ]
,
SphericalRegion -> True, BoxRatios -> 1
]
I think your best bet is to generate a triangualted polygon surface. Here is an initial stab at it:
p2d = b[[All, 1 ;; 2]];
tri1[i_, j_] :=
If[EvenQ[j], {{i, j}, {i + 1, j}, {i + 1/2, j + 1}} .05, {{i + 1/2,
j}, {i + 1 + 1/2, j}, {i + 1, j + 1}} .05]
tri2[i_, j_] :=
If[EvenQ[j], {{i, j}, {i + 1, j}, {i + 1/2, j - 1}} .05, {{i + 1/2,
j}, {i + 1 + 1/2, j}, {i + 1, j - 1}} .05]
triangles =
Flatten[Table[ tri2[i, j], {i, -45, 35}, {j, -55, 20}], 1]~Join~
Flatten[Table[ tri1[i, j], {i, -45, 35}, {j, -55, 20}], 1];
near = Nearest[p2d];
good = Select[triangles,
Total[Norm[(near[#, 1][[1]] - #)] & /@ #] < .001 &];
p3d[x_] := SortBy[b, Norm[#[[1 ;; 2]] - x] &][[1]]
sp3d = (p3d /@ #) & /@ good;
Graphics3D[{EdgeForm[None],
Polygon /@ (Select[sp3d, Variance[#[[All, 3]]] < .0001 &])},
BoxRatios -> {1, 1, 1}]
At this point I havn't dealt with the boundaries or the overlapping portions of the surface, but It should get you started.