<jupyter_start><jupyter_text>Visualizing Frame Dragging in Kerr Spacetime Importing required modules<jupyter_code>import numpy as np
import matplotlib.pyplot as plt

from einsteinpy.coordinates.utils import four_position, stacked_vec
from einsteinpy.geodesic import Geodesic
from einsteinpy.metric import Kerr<jupyter_output><empty_output><jupyter_text>Setting up metric and intial conditions<jupyter_code># Metric Parameters
M, a = 1.989e30, 0.3
 # Kerr Metric Object
ms_cov = Kerr(coords="BL", M=M, a=a)

# Initial conditions
x_vec = np.array([49.95e8, np.pi / 2, np.pi])
v_vec = np.array([0., 0., 0.])
t = 0.

# Getting Position 4-Vector
x_4vec = four_position(t, x_vec)
# Calculating Schwarzschild Metric at x_4vec
ms_cov_mat = ms_cov.metric_covariant(x_4vec)

# Getting stacked (Length-8) initial vector, containing 4-Pos and 4-Vel
init_vec = stacked_vec(ms_cov_mat, t, x_vec, v_vec, time_like=True)<jupyter_output><empty_output><jupyter_text>Calculating the geodesic<jupyter_code>geod = Geodesic(metric=ms_cov, init_vec=init_vec, end_lambda=33932.90, step_size=1.2)

ans = geod.trajectory

x, y = ans[:,1], ans[:,2]<jupyter_output><empty_output><jupyter_text>Plotting the geodesic<jupyter_code>%matplotlib inline

fig = plt.figure(figsize=(12,10))
plt.scatter(x, y, s=0.2)
plt.scatter(0, 0)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11742707554225879, 'fraction_numerical': 0.032909498878085267, 'mean_word_length': 7.0119760479041915, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '4980', 'license': 'MIT', 'n_tokens_mistral': 558, 'n_tokens_neox': 520, 'n_words': 111, 'path': 'docs/source/examples/Visualizing Frame Dragging in Kerr Spacetime using EinsteinPy!.ipynb', 'repo_name': 'bibek22/einsteinpy', 'size': '1337'}