I have a little problem and didn't succeed trying to solve it on my own. Situation is, I need a visualization of the function $s - 3\cdot s\cdot q + q$ as a region on p == 0 if function's value is less than zero, a region on p == 1 if the function > 0, and a contour if the function equals to zero.
What I've done:
RegionPlot3D[(s - 3q*s + q > 0 && p == 0) || (s - 3q*s + q <= 0 && p == 1),
{q, 0, 1}, {s, 0, 1}, {p, 0, 1}, AxesLabel -> Automatic]
which give me this:
but what I need to add is a contour $s - 3\cdot s\cdot q + q = 0$ to this plot, but also remain able to intersect this set with others.
The contour is simple:
ContourPlot3D[s - 3 q*s + q == 0, {p, 0, 1}, {q, 0, 1}, {s, 0, 1}]
I've tried to use a little hint with inequality range
RegionPlot3D[(s - 3 q s + q > 0 && p == 0) || (s - 3 q s + q <= 0 &&
p == 1) || Abs[s - 3 q s + q] < 0.01, {q, 0, 1}, {s, 0, 1}, {p,
0, 1}, AxesLabel -> Automatic, PlotPoint -> 100]
This is sufficiently accurate, but produces a 3d set, instead of a surface.
Any ideas how to reach my goal?
P.S. the best would be a solution to such kind of problems in general, because, sometimes the contour equation can be not that simple.