.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/relativity/kerr/plot_shadow_spin_sweep_animation.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_kerr_plot_shadow_spin_sweep_animation.py: Animating the shadow: a black hole spun up from rest ================================================================================ The static, side-by-side spin comparison in :doc:`plot_kerr_shadow_and_redshift` already shows that a black hole's shadow shrinks and its accretion disk creeps inward as the spin :math:`a` increases -- but a continuous sweep makes the *mechanism* far more vivid: watch the innermost stable circular orbit (ISCO) contract from :math:`6M` (Schwarzschild) down toward :math:`M` (extremal Kerr, prograde), dragging the disk's bright inner edge inward with it, while the shadow itself flattens and shifts off-center from frame dragging. .. math:: r_{\text{ISCO}}(a) : \quad 6M \ \xrightarrow{a \to M} \ M \qquad \text{(prograde)}, each frame's disk inner edge set to exactly this spin-dependent ISCO. .. GENERATED FROM PYTHON SOURCE LINES 21-26 .. code-block:: Python import matplotlib.pyplot as plt from physicskit.relativity.visualizers.shadow_render import animate_shadow_spin_sweep .. GENERATED FROM PYTHON SOURCE LINES 27-34 Sweep the spin from Schwarzschild to near-extremal Kerr ------------------------------------------------------------ Each frame is a full independent backward ray-trace at that frame's spin, with the disk's inner edge set to that spin's ISCO and the disk shaded by its combined gravitational and Doppler redshift, so the Doppler-brightened approaching side becomes progressively more pronounced as the disk edges closer to the horizon. .. GENERATED FROM PYTHON SOURCE LINES 34-44 .. code-block:: Python anim = animate_shadow_spin_sweep( M=1.0, ny=140, nx=140, inclination=1.3, r_disk_outer=16.0, redshift=True, ) plt.show() .. container:: sphx-glr-animation .. raw:: html .. GENERATED FROM PYTHON SOURCE LINES 45-49 To save the animation to a file instead of (or in addition to) displaying it interactively, use e.g.:: anim.save("kerr_shadow_spin_sweep.gif", writer="pillow", fps=5) .. rst-class:: sphx-glr-timing **Total running time of the script:** (1 minutes 35.453 seconds) .. _sphx_glr_download_api_gallery_relativity_kerr_plot_shadow_spin_sweep_animation.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_shadow_spin_sweep_animation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_shadow_spin_sweep_animation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_shadow_spin_sweep_animation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_