0

How to draw Flamm's paraboloid ?

tikz,pstricks,metapost,asymptote

\documentclass[12pt]{article}
\usepackage{mathtools,amssymb}
\usepackage{pgfplots}
\pgfplotsset{compat=newest,width=8cm}

\begin{document}

The spatial curvature of the Schwarzschild solution for $r > r_s$ .....

$w=2\sqrt{r_s(r-r_w)}$

For this exemple: w=z, r_s=y and r=x.

\begin{tikzpicture} \begin{axis} \addplot3{2sqrt(y(x-y))}; \end{axis} \end{tikzpicture}

\end{document}

Aviroum
  • 1,504
  • 1
    Possible duplicate https://tex.stackexchange.com/questions/505833/how-to-draw-a-black-hole-near-horizon-geometry-in-tikz and https://tex.stackexchange.com/questions/505844/how-to-display-a-duck-or-marmot-swallowed-by-a-darkhole – samcarter_is_at_topanswers.xyz Jan 18 '23 at 14:47

1 Answers1

1

I'm not familiar with the surface, the Flamm's paraboloid, but I'd think of something like this, assuming that the equation is using cylindrical polar coordinates:

\documentclass[12pt]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest,width=8cm}

\begin{document} The spatial curvature of the Schwarzschild solution for $r>r_s\ldots$ [w=2\sqrt{r_s(r-r_s)}.]

For this example: $w=z$ and $r_s=1$. \begin{figure}[ht]\centering \begin{tikzpicture} \begin{axis} \addplot3[surf,domain=1:10,domain y=0:2*pi,samples=31] ({\xcos(\y r)},{\xsin(\y r)},{2*sqrt(\x-1)}); \end{axis} \end{tikzpicture} \caption{Flamm's paraboloid.} \end{figure} \end{document}

enter image description here

Juan Castaño
  • 28,426
  • 1
    Thank you@Juan, @samcarter. Is it possible to have the same image orientation, color, large horizon. I'll try with view and colormap. – Aviroum Jan 18 '23 at 15:39