I have the function $f(x,y,z)=frac{x^2}{2}+x y+frac{y^2}{2}+z^2$. The solution set to the equation $f(x,y,z)=0$ is the line parametrized as $(t,-t,0)$. When I use ContourPlot3D on f=0 I get an empty graph. I begin to suspect that ContourPlot3D only works for level sets that are surfaces. Is this correct?

# Tag: ContourPlot3D

## syntax – Help understanding options on ContourPlot3D

I am creating some figures showing the intersection between two surfaces. I managed to get most of what I want with the following code:

```
ContourPlot3D[{z == g[x, y], z == g[p, q]},
{x, -1, 1}, {y, 0.11, 2}, {z, 0, 3},
ContourStyle -> {Directive[GrayLevel[0.71], Opacity[1]],
Directive[Blue, Opacity[0.2]]},
Mesh -> None,
BoundaryStyle -> {2 -> None, {1, 2} -> {Blue, Thick}, 1 -> None}];
```

I need help in understanding this line `BoundaryStyle -> {2 -> None, {1, 2} -> {Blue, Thick}, 1 -> None}`

. I want to change some options on one surface but not the other and I suspect that deciphering this line will show me how to do other stuff I want. I realize that I am undoubtedly missing some things about the Mathematica language broadly speaking, but I can’t seem to find exactly what I’m looking for, just bits and pieces that I haven’t been able to piece together.

## plotting – RegionFunction to clip ContourPlot3D results in unexpected shading

I am attempting to use RegionFunction to trim an implicit surface drawn with ContourPlot3D to only show the portion inside of a sphere (instead of the bounding box from PlotRange). However, when I attempt to do so, the region specified gets shaded in a little – which I do not want. Here’s a minimal example showing the issue,

```
ContourPlot3D(
x^2 + y^2 - z^4 - 1 == 0,
{x, -10, 10}, {y, -10, 10}, {z, -10, 10},
PlotPoints -> 50, Boxed -> False, Axes -> False,
RegionFunction -> Function({x, y, z}, x^2 + y^2 + z^2 < 25)
)
```

and a screenshot of it below.

The Mathematica documentation does not appear to show this shading of the region, and indeed when I copy/paste the example of a Plot3D with Regionfunction from the documentation it does not show up for me either. I think I have had it working before for ContourPlot3D as well, but cannot find an old example of mine. What is going on?

## plotting – help with ParametricNDSolveValue and ContourPlot3D

You need help configuring the graph for different values of c and

ContourPlot3D. In the ContourPlot3D code for each value of c there is a

value of l, so I need to solve the ode equation for each c and pass

The solution to l in the code ContourPlot3D.

```
[Epsilon] = $MachineEpsilon;
sol = ParametricNDSolveValue[{u''[r] + 2 u'[r]/r == c Sinh[u][r],
u[[Epsilon]] == u0, u'[[Epsilon]] == 0}, {u, u'}, {r, [Epsilon],
1}, {u0, c}, Method -> "StiffnessSwitching", 40,
WorkingPrecision -> 40]
Plot[Evaluate@Table[Tooltip[u][u0, c][r] /. sol, u0], u0, c] {c,
0.001, 0.01, 0.1}, {u0, -12, 2}, {r, 0, 1}
l = NIntegrate[r Exp[-u'][r] /. sol, {r, 0, 1}];
p1 = h - l + c
p2 = h1*log[2]
eq := p1 - p2 == 0
ContourPlot3D[Evaluate@eq, {h, -2, 2}, {h1, -3, 2}, {l},
Mesh -> False, MeshStyle -> {{Thick, Blue}}, Mesh -> {{0}},
ContourStyle ->
Directive[Orange, Opacity[0.5], Specularity[White, 30]]]
```

## traced – No shading in ContourPlot3D

Let's say you want to draw a horizontal plane using

```
ContourPlot3D[x == 0, {x, 0, 100}, {y, 0, 100}, {z, 0, 100}]
```

How to turn off the **shading**? I would like to have only a transparent grid. The option `Contour`

It seems that it is not the correct parameter to change.

## trace – ContourPlot3D in an explicit region

I would like to make a 3D outline graphic about an implied region, however, it seems that mma does not support arguments within an implicit region for ContourPlot3D, is there any way to overcome this?

Regarding my problem, the region is defined as:

`reg3d = ImplicitRegion[(1+k1+k2>=0&&1-k1+k2>=0&&k2<=0&&0[(1+k1+k2>=0&&1-k1+k2>=0&&k2<=0&&0<=k3[(1+k1+k2>= 0 && 1-k1 + k2> = 0 && k2 <= 0 && 0 <= k3<=6 )||(k2>= 0 && - 4k2 <= k1 <= 4 k2 && k1 ^ 2-8k2 (1-k2) <= 0 && 0 <= k3<=6)||(k2>= 0 && 4k2`= 0 && 0 <= k3<=6)||(k2>= 0 && -4k2> k1 && k1 + k2 + 1> = 0 && 0 <= k3 <= 6), {{k1, -1.5, 1.5}, {k2, -1, 1}, {k3, 0, 6}}];

he seems like

and the function that I would like to draw is:

```
gsc1[ K0_, K1_, K2_ ] : = 1 - (K0 - (K0 K1 K2) / 2);
```

I hope some expert can give me some suggestions, thank you very much!