I finished up imSimReal with IMSRGravity and IMSRPointObject this afternoon. I tagged it 0.1RC1 as the first release candidate for 0.1. I believe that this is complete for what I need to start work on GravityGames, my first iPhone app. It’s possible that more will be required, so I’ve left it as an RC1 and not final until GravityGames is complete.

IMSRGravity is as discussed earlier, a convenience wrapper for an NSDictionary containing the gravitational constants for various celestial bodies, such as Earth, Moon and Jupiter (included in the initial release).

IMSRPointObject represents a point mass in three dimensional space. It uses the classic kinematic equations to calculate a new position and velocity in three dimensions delta time in the future. The equations are:

r_{1} = r_{0} + v_{0}t + 0.5at^{2}

v_{1} = v_{0} + at

where:

r_{1} is the final position (meters)

r_{0} is the initial position (meters)

v_{0} is the initial velocity (meters/second)

v_{1} is the final velocity (meters/second)

a is the acceleration (meters/second^{2})

t is the time increment (seconds)

Gravity is always negative along the Z axis.

Technorati Tags:

Development, imSimReal, iPhone

Pingback: john-ahrens.com » John Ahrens, LLC Releases imSimReal 0.1RC1