Skip to main content
added 29 characters in body
Source Link
kglr
  • 403.4k
  • 18
  • 501
  • 959
SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___]c___] :>   Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /.b,  VertexNormals -> vn, c]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2, Show[pl, pl2]}] 

enter image description hereenter image description here

With m = 20; k = 100; we get

enter image description hereenter image description here

SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___] :>   Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2, Show[pl, pl2]}] 

enter image description here

With m = 20; k = 100; we get

enter image description here

SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, c___] :> Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b,  VertexNormals -> vn, c]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2, Show[pl, pl2]}] 

enter image description here

With m = 20; k = 100; we get

enter image description here

added 28 characters in body
Source Link
kglr
  • 403.4k
  • 18
  • 501
  • 959
SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___] :> Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2, Show[pl, pl2]}] 

enter image description hereenter image description here

Show[pl, pl2] 

With m = 20; k = 100; we get

enter image description hereenter image description here

SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___] :> Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2}] 

enter image description here

Show[pl, pl2] 

enter image description here

SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___] :> Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2, Show[pl, pl2]}] 

enter image description here

With m = 20; k = 100; we get

enter image description here

Source Link
kglr
  • 403.4k
  • 18
  • 501
  • 959

SeedRandom[7] n = 10000; pts = RandomReal[{-1, 1}, {n, 3}]; vals = Dot[pts^2, ConstantArray[1., 3]] + RandomVariate[NormalDistribution[0, .15], n]; data = Join[pts, Partition[vals, 1], 2]; pl = ListContourPlot3D[data, Contours -> {0.5}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]], PerformanceGoal -> "Quality", ImageSize -> 300]; 

Playing with parameters m and k gives something not too far off:

m = 200; k = 10; pl2 = pl /. GraphicsComplex[a_, b_, VertexNormals -> vn_, ___] :> Module[{nf = Nearest[a -> Automatic]}, GraphicsComplex[Mean[a[[nf[#, m]]] + vn[[nf[#, m]]]/k] & /@ a, b]] /. Orange -> Green /. Opacity[.5] -> Opacity[.8]; Row[{pl, pl2}] 

enter image description here

Show[pl, pl2] 

enter image description here