.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/relativity/spacetime_geometry/plot_kruskal_penrose_diagrams.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_relativity_spacetime_geometry_plot_kruskal_penrose_diagrams.py: Kruskal-Szekeres and Penrose-Carter diagrams: the true shape of spacetime ================================================================================ Schwarzschild coordinates :math:`(t, r)` blow up at the horizon :math:`r=2M` -- a coordinate artifact, since nothing physical happens there (a free-falling observer notices nothing special crossing it). Kruskal and Szekeres found coordinates :math:`(X, T)` that are perfectly smooth across the horizon: in the exterior (:math:`r>2M`), .. math:: X = \sqrt{r/2M - 1}\, e^{r/4M} \cosh(t/4M), \qquad T = \sqrt{r/2M - 1}\, e^{r/4M} \sinh(t/4M) (with :math:`\sinh` and :math:`\cosh` swapping roles inside the horizon), so that light rays always travel at :math:`\pm 45^\circ` and the horizon itself maps to the lines :math:`X=\pm T`. These coordinates reveal a startling fact: the maximally extended spacetime contains *two* separate asymptotically flat exterior regions, joined by a non-traversable "Einstein-Rosen bridge." Compactifying further -- applying :math:`\arctan` to the null combinations :math:`u=T-X`, :math:`v=T+X` -- gives the Penrose-Carter diagram, bringing the entire infinite spacetime, including future and past null infinity, into one finite diagram while preserving the :math:`\pm 45^\circ` light cones, making the whole causal structure visible at a glance. .. GENERATED FROM PYTHON SOURCE LINES 28-33 .. code-block:: Python import matplotlib.pyplot as plt from physicskit.relativity.visualizers.spacetime_diagrams import plot_kruskal_diagram, plot_penrose_diagram .. GENERATED FROM PYTHON SOURCE LINES 34-36 Kruskal-Szekeres diagram ---------------------------- .. GENERATED FROM PYTHON SOURCE LINES 36-40 .. code-block:: Python fig, ax = plt.subplots(figsize=(6, 6)) plot_kruskal_diagram(M=1.0, ax=ax) plt.tight_layout() .. image-sg:: /api/gallery/relativity/spacetime_geometry/images/sphx_glr_plot_kruskal_penrose_diagrams_001.png :alt: Kruskal-Szekeres diagram :srcset: /api/gallery/relativity/spacetime_geometry/images/sphx_glr_plot_kruskal_penrose_diagrams_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 41-43 Penrose-Carter conformal diagram ---------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 43-47 .. code-block:: Python fig, ax = plt.subplots(figsize=(6, 6)) plot_penrose_diagram(M=1.0, ax=ax) plt.tight_layout() plt.show() .. image-sg:: /api/gallery/relativity/spacetime_geometry/images/sphx_glr_plot_kruskal_penrose_diagrams_002.png :alt: Penrose-Carter conformal diagram :srcset: /api/gallery/relativity/spacetime_geometry/images/sphx_glr_plot_kruskal_penrose_diagrams_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.072 seconds) .. _sphx_glr_download_api_gallery_relativity_spacetime_geometry_plot_kruskal_penrose_diagrams.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_kruskal_penrose_diagrams.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_kruskal_penrose_diagrams.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_kruskal_penrose_diagrams.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_