# How to cut legs of 'pants' cobordism?

How do I have to change math expression or imaging intervals in order to cut 'legs' by sagittal secant planes I marked with red?

ContourPlot3D[(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 + y^2 -
1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z,
0, 1}, PlotPoints -> 200]


and a bit changed with two planes to cut

p1 = ContourPlot3D[
0.475 x - z == -0.55, {x, -2, 2}, {y, -2, 2}, {z, 0, 1},
ContourStyle -> Red];
p2 = ContourPlot3D[(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 + y^2 -
1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z,
0, 1}, PlotPoints -> 200];
p3 = ContourPlot3D[
0.475 x + z == 0.55, {x, -2, 2}, {y, -2, 2}, {z, 0, 1},
ContourStyle -> Blue];
Show[p1, p2, p3, ViewPoint -> {0.3, -2, 0.3}]


• Look up RegionFunction. Commented Sep 12, 2017 at 14:23
• Thank you very much Commented Sep 12, 2017 at 14:31
• You should proviide your code,but not just screenshoot.That why you get those downvote I think..
– yode
Commented Sep 13, 2017 at 12:18

RegionFunction (per @J.M. comment) can help. A less known but nice option is ClipPlanes. Just for fun I will explain this. Because you giving no copy-able code (which you need to learn to do at already >1000 reputation) and no equations for planes I gave you my own example with various details/options.

Graphics3D[
{Sphere[{0, 0, 0}, 1/2],
Style[Sphere[], Red,
ClipPlanes -> InfinitePlane[{{0, 0, 0}, {0, 1, 1}, {1, 1, 2}}]]},
ClipPlanesStyle -> Opacity[0.3],
SphericalRegion->True]


Because ClipPlanes is Graphics3D option you need to do some tricks, for example:

transcendental=ContourPlot3D[
Cos[x]Sin[y]+Cos[y]Sin[z]+Cos[z]Sin[x]==0,
{x,-2π,2π}, {y,-2π,2π},{z,-2π,2π},
ContourStyle->Directive[FaceForm[Orange,Red],Specularity[White,30]],
Mesh->None]


Graphics3D[First[transcendental],
ClipPlanes -> InfinitePlane[{{0, 0, 0}, {0, 1, 1}, {1, 1, 2}}],
ClipPlanesStyle -> Opacity[0.3]]


I updated my Mathematica and finally did it with both methods!

regions = {Function [{x, y, z}, 0.55 < (0.3 x + z) && x < 0], Function [{x, y, z}, (0.3 x - z) < -0.55 && x > 0]};
MapThread [ContourPlot3D [(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 + y^2 -
1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z,
0, 1}, RegionFunction -> #, PlotPoints -> 200] &, {regions}] // Show


trans = ContourPlot3D [(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 +
y^2 - 1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z, 0, 1}, PlotPoints -> 200];
Graphics3D [First[trans], ClipPlanes -> {InfinitePlane[{{0, 0, 0.55}, {-2, 2, 1.5}, {-2, -2,
1.5}}], InfinitePlane[{{0, 0, 0.55}, {-2,
2, -0.5}, {-2, -2, -0.5}}]}]


Thank you for hints!

And several more, sorry I can't resist:
Striped with MeshFunctions

regions = {Function[{x, y, z}, 0.55 < (0.475 x + z) && x < 0],
Function[{x, y, z}, (0.475 x - z) < -0.55 && x > 0]};

ContourPlot3D[(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 + y^2 -
1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z,
0.5, 1}, RegionFunction -> #, PlotPoints -> 200,
BoxRatios -> {1, 1, 1/8}, ViewPoint -> {Front}, Mesh -> 5,
MeshShading -> {Pink, White}, MeshFunctions -> {#1 &},
ImageSize -> Large,
Lighting -> {{"Directional", White, {0, -2, 0}}}] &, {regions}
] // Show


Sine sections

regions = {Function[{x, y, z},
0.55 < (0.3*x + z + 0.04*Sin[1.7*x - 17*z]) && x < 0],
Function[{x, y, z}, (0.3 *x - z + 0.04*Sin[1.7*x + 17*z]) < -0.55 &&
x > 0]};

ContourPlot3D[(1 - z) ((x - 1)^2 + y^2 - 1/3)*((x + 1)^2 + y^2 -
1/3) + z (x^2 + y^2 - 1/3) == 0, {x, -2, 2}, {y, -2, 2}, {z,
0.5, 1}, RegionFunction -> #, PlotPoints -> 200,
BoxRatios -> {1, 1, 1/8}, ViewPoint -> {0.3, -2, -1},
Mesh -> None, ContourStyle -> Red] &, {regions}];
Show[gobj, ImageSize -> Large, Boxed -> False]


Sorry. It was big fun.