DampedHarmonic¶
Overview¶
Solves for a specific solution of a damped harmonic oscillator (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator), given the initial value and derivative.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class DampedHarmonic¶
Constructor¶
new DampedHarmonic( a : number, b : number, c : number, initialValue : number, initialDerivative : number )¶
Instance Methods¶
getValue( t : number ) : number¶
Returns the value of x(t) determined by the differential equation and initial conditions.
getDerivative( t : number ) : number¶
Returns the value of x'(t) determined by the differential equation and initial conditions.
Source Code¶
See the source for DampedHarmonic.ts in the dot repository.