Simple Harmonic Motion

 

Simple harmonic motion is the motion of a simple harmonic oscillator, a motion that is neither driven nor damped. The motion is periodic, as it repeats itself at standard intervals in a specific manner - described as being sinusoidal, with constant amplitude. It is characterized by its amplitude (which is always positive), its period which is the time for a single oscillation, its frequency which is the number of cycles per unit time, and its phase, which determines the starting point on the sine wave. The period, and its inverse the frequency, are constants determined by the overall system, while the amplitude and phase are determined by the initial conditions (position and velocity) of that system. (Wikipedia, 2008)

 

A general equation describing simple harmonic motion is x=Acos(2pft+f), where x is the displacement, A is the amplitude of oscillation, f is the frequency, t is the elapsed time, and f is the phase of oscillation.

 

To create a simple model of simple harmonic motion, I have created an animated VB program which used the equation x=Acos(wt), and I have assigned a value of 500 to A and a value of 50 to w. In this program, the circle which I have inserted into the form will oscillate from left to right, reaching maximum speed at the middle of the path.

 

 

 

Dim t As Integer

Private Sub cmd_Start_Click()

Timer1.Enabled = True

End Sub



Private Sub cmd_Stop_Click()
Timer1.Enabled = False

End Sub

Private Sub Timer1_Timer()
t = t + 1
x = 500 * Cos(50 * t)
Shape1.Move Shape1.Left + x
End Sub

Explantion

 

In this program, you have to insert a shape and set it to be a circle in the properties windows. Next, insert two command buttons and change the captions to start and stop respectively. Finally, insert a timer and set its interval to be 1000 and disabled it at start up.

 

I used the move method  to move the shape1 object and the formula

 x = 500 * Cos(50 * t) according to simple harmonic motion. When you run the program, the circle will move in an oscillating motion as shown in the diagram

 

 

 

 

 

 

 [Back to Sample Program]