When I try to use a pre-defined expression in RegionFunction, I get errors:
f = x^2 + y^2 + z^2 - 1
g = x+y+z
ContourPlot3D[f == 0, {x, -3, 3}, {y, -3, 3}, {z, -2, 5},
RegionFunction -> Function[{x, y, z}, 0 <= g]]
I've tried to fix this with using eg "With", but I haven't been able to. Can anyone help me?
ContourPlot3D
like other plotting functions has the attributeHoldAll
so, as pointed out by @cvgmt, must be evaluated. $\endgroup$