I have a Manipulate
that allow users to choose which costs to disabled and they can slide the remaining sliders. I want the points that have (x,y,z)
cost less than the value of active slider to be in red color and the remaining points in blue color.
For example, if "without" cost 1
is chosen, all the points that are less than $\epsilon_2$ and $\epsilon_3$ needs to be in red color following the slider. Any suggestions?
Here is the code that I've done.
p = Cuboid[{-100, -100, -100}, {100, 100, 100}];
pt = RandomPoint[p, 200];
Manipulate[
f = ContourPlot3D[x == Subscript[\[Epsilon], 1], {x, -150, 150}, {y, -150, 150},
{z, -150, 150}, Mesh -> None, BoundaryStyle -> None, ContourStyle -> Opacity[0.7]];
g = ContourPlot3D[y == Subscript[\[Epsilon], 2], {x, -150, 150}, {y, -150, 150},
{z, -150, 150}, Mesh -> None, BoundaryStyle -> None, ContourStyle -> Opacity[0.7]];
h = ContourPlot3D[z == Subscript[\[Epsilon], 3], {x, -150, 150}, {y, -150, 150},
{z, -150, 150}, Mesh -> None, BoundaryStyle -> None, ContourStyle -> Opacity[0.7]];
Show[
If[without == "cost 1", Show[g, h],
If[without == "cost 2", Show[f, h],
If[without == "cost 3", Show[f, g], Graphics3D[]]]],
ListPointPlot3D[pt, PlotStyle -> Directive[Red, PointSize[Medium]]],
AxesLabel -> {Subscript[c, 1], Subscript[c, 2], Subscript[c, 3]}],
{Subscript[\[Epsilon], 1], -100, 100, Appearance -> "Labeled", Enabled ->(without =!= "cost 1")},
{Subscript[\[Epsilon], 2], -100, 100, Appearance -> "Labeled", Enabled -> (without =!= "cost 2")},
{Subscript[\[Epsilon], 3], -100, 100, Appearance -> "Labeled", Enabled -> (without =!= "cost 3")},
{without, {"cost 1", "cost 2", "cost 3"}, ControlType -> PopupMenu},
Button["Reset", {Subscript[\[Epsilon], 1] = -100,
Subscript[\[Epsilon], 2] = -100, Subscript[\[Epsilon], 3] = -100}, ImageSize -> Large],
ControlPlacement -> Left]