.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples\geodesic.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_auto_examples_geodesic.py: Geodesic Path Example ===================== Compute multiple points along the geodesic curve between two points on the unit sphere. .. GENERATED FROM PYTHON SOURCE LINES 7-29 .. rst-class:: sphx-glr-script-out .. code-block:: none Inputs: t = [0.25 0.5 0.75] p = [1. 0. 0.] q = [0. 1. 0.] a = 0.0 , b = 1.0 Geodesic points at t = [0.25, 0.5, 0.75]: [[0.92387953 0.38268343 0. ] [0.70710678 0.70710678 0. ] [0.38268343 0.92387953 0. ]] | .. code-block:: Python import numpy as np from spheresmooth import geodesic # Example inputs t = np.array([0.25, 0.5, 0.75]) p = np.array([1.0, 0.0, 0.0]) q = np.array([0.0, 1.0, 0.0]) a = 0.0 b = 1.0 print("Inputs:") print("t =", t) print("p =", p) print("q =", q) print("a =", a, ", b =", b) # Compute the geodesic curve at multiple time points gamma = geodesic(t, p, q, a, b) print("\nGeodesic points at t = [0.25, 0.5, 0.75]:") print(gamma) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.001 seconds) .. _sphx_glr_download_auto_examples_geodesic.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: geodesic.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: geodesic.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: geodesic.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_