Note
Go to the end to download the full example code.
Geodesic Curve Example#
Compute a point on the geodesic curve connecting two points on the unit sphere.
Inputs:
t = 0.5
p = [1. 0. 0.]
q = [0. 1. 0.]
a = 0.0 , b = 1.0
Geodesic point at t = 0.5:
[0.70710678 0.70710678 0. ]
import numpy as np
from spheresmooth import geodesic_lower
# Example inputs
t = 0.5
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 geodesic point
result = geodesic_lower(t, p, q, a, b)
print("\nGeodesic point at t = 0.5:")
print(result)
Total running time of the script: (0 minutes 0.001 seconds)