Using SphericalPlot3D
, I find I get two types of artifact:
- A discontinuity in the surface reflectance at $\theta=0,2\pi$
- Little edges, or perhaps gaps between faces, showing in some regions — this depends very much on the angle that the object is viewed from. If you run the code below, it might not show it without some rotation.
They can both be seen in this
How do I get rid of them?
Here's the code to reproduce the problem.
GreatCircleDistance[a_, b_] := ArcCos[(a.b)/(Norm[a, 2] Norm[b, 2])]
SphereToCart[{r_, ϕ_, θ_}] = r {Cos[θ] Sin[ϕ], Sin[θ] Sin[ϕ], Cos[ϕ]}
TotalDistance[θ_, ϕ_] :=
3 +
Plus @@
(Exp[-10 GreatCircleDistance[SphereToCart[{1, θ, ϕ}], #]^2] & /@
(PolyhedronData["Icosahedron", "VertexCoordinates"] // N))
SphericalPlot3D[TotalDistance[θ, ϕ], {θ, 0, π}, {ϕ, 0, 2 π},
PlotStyle -> Directive[Orange, Opacity[1], Specularity[White, 10]],
Mesh -> None,
PlotPoints -> 30]
ParametricPlot3D[]
instead works:With[{icos = N[PolyhedronData["Icosahedron", "VertexCoordinates"]]}, ParametricPlot3D[With[{sph = {Cos[ϕ] Sin[θ], Sin[θ] Sin[ϕ], Cos[θ]}}, (3 + Sum[Exp[-10 VectorAngle[sph, pts]^2], {pts, icos}]) sph], {θ, 0, π}, {ϕ, 0, 2 π}, Mesh -> None, PlotPoints -> 30, PlotStyle -> Directive[Orange, Specularity[1, 10]]]]
. $\endgroup$