Circular Motion#
If \(P\) is observed in \(\mathbf{e}\) to move in a circle at a constant rate in the \(\mathbf{e}_1,\mathbf{e}_2\) plane then \(P\) has the representation \(\left(t, (\sin{(\omega t)},\cos{(\omega t)},0)\right)\). Then in the \(\mathbf{e}'\) frame that is moving in the \(\mathbf{e}_3\) direction at a constant rate \(v\) we see that this point has the representation \(\left(t, (\sin{(\omega t)},\cos{(\omega t)},-vt)\right)\) and hence is observed to be moving in a helical path.
Import following libraries on your notebook
[4]:
import plotly.graph_objects as go
import numpy as np
Note
The functions create_line_trace
, create_point_trace
, create_arrow_trace
, and and
others were written in previous tutorials. Please include them in your notebook on top before
starting to follow this tutorial. You can download it by clicking the Download icon on the
Navigation Bar.
Since we have explained the syntax and functions going to use here I am leaving the code only. Follow the previous tutorials for better understanding. Hit the play button and see!
In \(e\) Frame#
[6]:
# Define constants
v = np.array([0, 0, 1]) # Constant velocity vector
w = 4 # Angular frequency
# Generate time values from 0 to 5 with 101 points
tt = np.linspace(0, 5, 101)
# Initialize an array to store particle positions
zeta = np.zeros((len(tt), 3))
# Calculate particle positions based on the given formula
for i, t in enumerate(tt):
# Calculate acceleration vector based on sinusoidal motion
a = np.array([np.sin(w * t), np.cos(w * t), 0])
# Update particle position using the formula (a - v * t)
zeta[i, :] = (a - v * t)
# Create a particle animation using the calculated positions
fig = create_particle_animation(zeta)
# Display the animation
fig.show()