1
$\begingroup$

I'm reading about non-euclidean geometry, and I tried to visualize hyperboloid model of hyperbolic geometry using Mathematica.

What I need to do is to accent intersections between hyperboloid $x^2 + y^2 - z^2 = 0$ and various planes. I've been able to do it using ContourPlot3D and MeshFunctions in the following way:

gr = ContourPlot3D[
  x^2 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, 0, 2}, 
  Axes -> False, PlotPoints -> 30, 
  MeshFunctions -> {Function[{x, y, z}, x]}, Mesh -> {{0.}}, 
  MeshStyle -> Thick]

But I would like to visualize multiple plane-hyperboloid intersections in one picture (they correspond to lines in this model of hyperbolic geometry). How could I do that?

$\endgroup$

1 Answer 1

2
$\begingroup$

Just put the alternate functions in your MeshFunctions list:

gr = ContourPlot3D[
  x^2 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, 0, 2},
  Axes -> False,
  PlotPoints -> 30,
  MeshFunctions -> {Function[{x, y, z}, x], 
    Function[{x, y, z}, 2 x + y]}, 
   Mesh -> {{0.}},
  MeshStyle -> Thick]

But be sure to define your MeshFunctions such that the Mesh-> {{0.}} applies to each.

$\endgroup$

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.