2
$\begingroup$

How can I find all the level curves of the 3-D cylinder $x^2+2z^2=1$?

I want the level curves obtained by fixing (1) $x=k,$ (2) $y=k$ and (3) $z=k$ for some values of $k$ and I would like the graphs of the traces to lie in the corresponding 2D plane and not on the 3D surface.

Is there a feature that allows me to find all 3 traces for some values of $k$ at the same time just by inserting the surface? I would like 3 2-D graphs, one each corresponding to (1), (2), and (3).

For example, the traces should be in planes as in the following:enter image description here

| improve this question | | | | |
$\endgroup$
  • $\begingroup$ does this give something close to what you need? k = 0; ContourPlot3D[ x^2 + 2 z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, MeshFunctions -> {# &, #2 &, #3 &}, Mesh -> {{k}, {k}, {k}}] $\endgroup$ – kglr Apr 23 '17 at 23:22
  • $\begingroup$ I would like to have each of the level curves on a separate plane. For example, the circles obtained by letting $y=k$ should be on a 2-D xz plane, and so on. $\endgroup$ – The Substitute Apr 23 '17 at 23:28
1
$\begingroup$
k = 1/2;
facegrids = {#, {{k}, {k}}} & /@ Join[#, -#] &@IdentityMatrix[3];

cp3d = ContourPlot3D[x^2 + 2 z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1},
 ContourStyle -> Directive[Orange, Opacity[0.8], Specularity[White, 30]], 
 MeshFunctions -> {# &, #2 &, #3 &}, 
 Mesh -> {{{k, Directive[Thick, Red]}}, {{k, Directive[Thick, Green]}}, 
  {{k, Directive[Thick, Blue]}}}, 
 FaceGrids -> facegrids]

Mathematica graphics

 planes = Graphics3D[{Opacity[.5], InfinitePlane/@
      NestList[RotateRight/@#&, {{k, -1,-1}, {k,-1, 1}, {k, 1,1}},3]}]

 Show[cp3d, planes]

Mathematica graphics

| improve this answer | | | | |
$\endgroup$
  • $\begingroup$ Although the graphic is very nice, can you place those traces on 3 separate planes (the projection of your level curves onto the corresponding coordinate planes)? I have edited to include an image of the type of planes I am looking for. $\endgroup$ – The Substitute Apr 23 '17 at 23:52
  • $\begingroup$ Can you make each of the planes facing the viewer such as in the picture I attached? $\endgroup$ – The Substitute Apr 24 '17 at 0:00
  • $\begingroup$ @TheSubstitute, i should have read your edit before my update:) i will see what i can do. $\endgroup$ – kglr Apr 24 '17 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.