Gravity Engine
1.5
Unity Asset for Gravity

Newton force. This is not generally used  since Netwonian gravity is the more efficient default force built in to the integrators. More...
Public Member Functions  
double  CalcF (double r_sep) 
Calculate the distance dependent force of two bodies seperated by distance r_sep. (Note: This has taken e.g. F1 = m1 a1 = (G m1 m2)/r^2 and removes m1 and m2. These are handled in the integrator. More...  
double  CalcFdot (double r_sep) 
Calculates the time derivitive of the force law This function is required only by the Hermite algorithm. If Leapfrog is used it can be stubbed out. More...  
Newton force. This is not generally used  since Netwonian gravity is the more efficient default force built in to the integrators.
This code is used to double check the force delegate code
double NewtonForce.CalcF  (  double  r_sep  ) 
Calculate the distance dependent force of two bodies seperated by distance r_sep. (Note: This has taken e.g. F1 = m1 a1 = (G m1 m2)/r^2 and removes m1 and m2. These are handled in the integrator.
e.g. for Newtonian (1/R^2) gravity this would be: m2/(r_sep*r_sep);
m2  M2. 
r_sep  R sep. The distance between the bodies 
Implements IForceDelegate.
double NewtonForce.CalcFdot  (  double  r_sep  ) 
Calculates the time derivitive of the force law This function is required only by the Hermite algorithm. If Leapfrog is used it can be stubbed out.
e.g. for Newtonian (1/R^2) gravity
m2  M2. 
r_sep  R sep. 
Implements IForceDelegate.