surface[x_, y_, z_] := Piecewise[{{(x - 1/2)^2 + y^2 + z^2 -
1/16, (x - 1/2)^2 + y^2 + z^2 - 1/16 <= 0 && z >= 0}}, z];
ContourPlot3D[{surface[x, y, z] == 0},
{x, -1, 1}, {y, -1, 1}, {z, -0.1, 0.3},
PlotRange -> {{-1, 1}, {-1, 1}, {-0.5, 1.5}},
ImageSize -> 600,
BoundaryStyle -> None,
Mesh -> None,
ViewPoint -> {2, -6, 2}
]
The plot is like below. Then I want to paint the region constrained by
320x^2-304x+256y^2+57>=0 && 15x^2-16x+19y^2+3<=0
with Black color, and the rest area is Orange.

Comments
Post a Comment