# 3 Frequency classical SHO

summary:

The 3 complex planes in a quaternion can be tuned to different frequencies and amplitudes.

description:

The simple harmonic oscillator is in yellow, its velocity in blue, and acceleration in red. The scalar value for the a low velocity system is equal to one while the scalar acceleration is zero. The differences between both frequencies and amplitudes change the relative lengths of the blue and red lines, velocity and acceleration respectively. In this example, the frequency decreases while the amplitude increase going from x to y to z.

command:
q_graph -out sho-xyz_and_v_and_a -dir sho -box 10 -command 't_function -mqs 2 -mqs 1 -t_function polynomial -t_function one -x_function cos -x_function polynomial -y_function cos -y_function polynomial -z_function cos -z_function polynomial 1 2 1 2 1 3 2 1 0 1 6 8 -shift "-11 5 0 0" -pi 8 -n_steps 1600' -color yellow -command 't_function -mqs 2 -mqs 1 -t_function one -t_function one -x_function sin -x_function polynomial -y_function sin -y_function polynomial -z_function sin -z_function polynomial -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 2 1 0 -2 -6 -4' -color blue -command 't_function -mqs 2 -mqs 1 -t_function zero -t_function zero -x_function cos -x_function polynomial -y_function cos -y_function polynomial -z_function cos -z_function polynomial -shift "0 5 0 0" -pi 8 -n_steps 1600 -- 1 2 1 2 1 3 2 1 0 -4 -6 -2' -color red
math
equation:

$(t, x, y, z) = (t, cos(2 t + 3), 6 cos(t + 2), 8 cos(t/2 + 1))$
$(\gamma, \gamma \beta_x, \gamma \beta_y, \gamma \beta_z) = (1, -2 sin(2 t + 3), -6 sin(t + 2), -4 sin(t/2 + 1))$
$(a_t, a_x, a_y, a_z) = (0, -4 cos(2 t + 3), -6 cos(t + 2), -2 cos(t/2 + 1))$

tags
Physics Tag:
simple harmonic oscillator
Math Tag:
sine
cosine
Programming Tag:
command line quaternions
t_function