<jupyter_start><jupyter_text>Animations in EinsteinPy Import the required modules<jupyter_code>import numpy as np

from einsteinpy.coordinates.utils import four_position, stacked_vec
from einsteinpy.geodesic import Geodesic
from einsteinpy.metric import Schwarzschild
from einsteinpy.plotting import StaticGeodesicPlotter<jupyter_output><empty_output><jupyter_text>Defining various parameters  - Mass of the attractor (M)  - Initial position and velocity vectors of test partcle<jupyter_code># Metric Parameters and Initial Conditions
M = 6e24  # Mass
t = 10.  # Coordinate Time (has no effect in this case - Schwarzschild)
x_vec = np.array([130.0, np.pi / 2, -np.pi / 8])  # 3-Pos
v_vec = np.array([0.0, 0.0, 1900.0])  # 3-Vel

# Schwarzschild Metric Object
ms_cov = Schwarzschild(M=M)
# 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)


# Calculating Geodesic
geod = Geodesic(metric=ms_cov, init_vec=init_vec, end_lambda=0.002, step_size=5e-8)
geod<jupyter_output><empty_output><jupyter_text>Animating<jupyter_code>%matplotlib notebook
obj = StaticGeodesicPlotter()
obj.animate(geod, interval=25)
obj.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09420289855072464, 'fraction_numerical': 0.02681159420289855, 'mean_word_length': 6.464864864864865, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '58974', 'license': 'MIT', 'n_tokens_mistral': 534, 'n_tokens_neox': 490, 'n_words': 120, 'path': 'docs/source/examples/Animations in EinsteinPy.ipynb', 'repo_name': 'bibek22/einsteinpy', 'size': '1380'}