Package com.titan.math
Class DifferentialEquation
java.lang.Object
com.titan.math.DifferentialEquation
Differential equation solves d/dt for positions and velocities:
d/dt ( x(t) ; v(t) ) = ( v(t) ; f(t,x(t)) )
d/dt ( x(t) ; v(t) ) = ( v(t) ; f(t,x(t)) )
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DifferentialEquation
public DifferentialEquation()
-
-
Method Details
-
solve
public static Vector[] solve(Function f, Vector positions, Vector velocities, Vector masses, double h, double t) this method calculates the result of the differential equation for positions and velocities- Parameters:
f
- function to calculate the derivative of the velocitiespositions
- vector of all the positionsvelocities
- vector of all the velocitiesmasses
- masses of the objects
-