How to get rid of "fringes" in 3D plot?
The fringes stem from the fact that the disk is discretized into a triangle mesh and its boundary edges are not very short (and the fact that $\sqrt{1 - r^2}$ is not differentiable at the point $r =1$). You can avoid this, e.g., by using a different parameterization:
s1 = ParametricPlot3D[{0, a, 0} + {r Cos[t], Sqrt[1 - r^2], r Sin[t]},
{r, 0, 1}, {t, -Pi, Pi},
Mesh -> 21, Boxed -> False, Axes -> None, ColorFunction -> myGray,
PlotPoints -> 100
]
You can restrict x
and y
to Disk[]
using RegionFunction
:
s1 = ParametricPlot3D[{0, a, 0} + {x, Sqrt[1 - x^2 - y^2], y},
{x, -Pi, Pi}, {y, -Pi, Pi},
RegionFunction -> (#3^2 + #4^2 <= 1 &), Mesh -> 21,
Boxed -> False,
Axes -> None,
ColorFunction -> myGray,
PlotPoints -> 100]
Doing the same for s2
thru s6
we get
ImplicitRegion[]
works better than Disk[]
(but why?):
ParametricPlot3D[{2.3, 0, 0} + {Sqrt[1 - x^2 - y^2], x, y},
{x, y} ∈ ImplicitRegion[x^2 + y^2 <= 1, {x, y}], Mesh -> 21,
Boxed -> False, Axes -> None, ColorFunction -> (GrayLevel[1] &),
PlotPoints -> 100]
Update:
Another approach is to control the discretization of the Disk[]
, the boundary being the most important element in this problem:
disk = BoundaryDiscretizeRegion[Disk[{0, 0}, 1], MaxCellMeasure -> "Length" -> 0.001];
disk = DiscretizeRegion[disk];
ParametricPlot3D[{0, 2.3, 0} + {x, Sqrt[1 - x^2 - y^2], y},
{x, y} ∈ disk, Mesh -> 21, Boxed -> False, Axes -> None,
ColorFunction -> (White &), PlotRange -> All]