anchor.diff:  
   %% ------------------------------------------------------------------------
   %% External API
  +%% ------------------------------------------------------------------------
  +
  +%% @doc Simulate physical movement of the 'physical' object represented by `InitialPhysical`, over the time since that
  +%% object's 'last_update' timestamp.
  +simulate(InitialPhysical) ->
  +	LastUpdate = InitialPhysical#physical.last_update,
  +	ThisUpdate = os:timestamp(),
  +	NewPhysical = simulate(timer:now_diff(ThisUpdate, LastUpdate) / 1000000, InitialPhysical),
  +	NewPhysical#physical {
  +		last_update = ThisUpdate
  +	}.
  +
  +%% @doc Simulate physical movement of the 'physical' object represented by `InitialPhysical`, over the given
  +%% `TimeDelta`.
  +simulate(TimeDelta, InitialPhysical) ->
  +	simulate_internal(TimeDelta, InitialPhysical).
  +
  +%% ------------------------------------------------------------------------
  +
  +%% @doc Create a new 'physical' record, with the 'last_update' timestamp set to the current time.
  +default_physical() ->
  +	#physical{last_update = os:timestamp()}.
  +
  +%% ------------------------------------------------------------------------
  +
  +to_proplist(Physical) ->
  +	[
  +		{position, Physical#physical.position},
  +		{linear_momentum, Physical#physical.linear_momentum},
  +		{orientation, Physical#physical.orientation},
  +		{angular_momentum, Physical#physical.angular_momentum},
  +
  +		{force_absolute, Physical#physical.force_absolute},
  +		{force_relative, Physical#physical.force_relative},
  +		{torque_absolute, Physical#physical.torque_absolute},
  +		{torque_relative, Physical#physical.torque_relative},
  +
  +		{last_update, Physical#physical.last_update},
  +		{linear_velocity, Physical#physical.linear_velocity},
  +		{angular_velocity, Physical#physical.angular_velocity},
  +		{spin, Physical#physical.spin},
  +
  +		{mass, Physical#physical.mass},
  +		{inverse_mass, Physical#physical.inverse_mass},
  +		{inertia_tensor, Physical#physical.inertia_tensor},
  +		{inverse_inertia_tensor, Physical#physical.inverse_inertia_tensor}
  +	].
  +
  +%% ------------------------------------------------------------------------
  +
  +from_proplist(PhysicalProplist) ->
  +	update_from_proplist(#physical{}, PhysicalProplist).
  +
  +%% ------------------------------------------------------------------------
  +
  +update_from_proplist(Physical, []) ->
  +	Physical;
  +
  +update_from_proplist(Physical, [{}]) ->
  +	Physical;
  +
  +update_from_proplist(Physical, [{position, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{position = Val}, Rest);
  +update_from_proplist(Physical, [{linear_momentum, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{linear_momentum = Val}, Rest);
  +update_from_proplist(Physical, [{orientation, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{orientation = Val}, Rest);
  +update_from_proplist(Physical, [{angular_momentum, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{angular_momentum = Val}, Rest);
  +
  +update_from_proplist(Physical, [{force_absolute, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{force_absolute = Val}, Rest);
  +update_from_proplist(Physical, [{force_relative, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{force_relative = Val}, Rest);
  +update_from_proplist(Physical, [{torque_absolute, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{torque_absolute = Val}, Rest);
  +update_from_proplist(Physical, [{torque_relative, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{torque_relative = Val}, Rest);
  +
  +update_from_proplist(Physical, [{last_update, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{last_update = Val}, Rest);
  +update_from_proplist(Physical, [{linear_velocity, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{linear_velocity = Val}, Rest);
  +update_from_proplist(Physical, [{angular_velocity, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{angular_velocity = Val}, Rest);
  +update_from_proplist(Physical, [{spin, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{spin = Val}, Rest);
  +
  +update_from_proplist(Physical, [{mass, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{mass = Val}, Rest);
  +update_from_proplist(Physical, [{inverse_mass, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{inverse_mass = Val}, Rest);
  +update_from_proplist(Physical, [{inertia_tensor, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{inertia_tensor = Val}, Rest);
  +update_from_proplist(Physical, [{inverse_inertia_tensor, Val} | Rest]) ->
  +	update_from_proplist(Physical#physical{inverse_inertia_tensor = Val}, Rest).
  +
  +%% ------------------------------------------------------------------------
  +
  +get_prop(position, Physical) ->
  +	Physical#physical.position;
  +get_prop(linear_momentum, Physical) ->
  +	Physical#physical.linear_momentum;
  +get_prop(orientation, Physical) ->
  +	Physical#physical.orientation;
  +get_prop(angular_momentum, Physical) ->
  +	Physical#physical.angular_momentum;
  +
  +get_prop(force_absolute, Physical) ->
  +	Physical#physical.force_absolute;
  +get_prop(force_relative, Physical) ->
  +	Physical#physical.force_relative;
  +get_prop(torque_absolute, Physical) ->
  +	Physical#physical.torque_absolute;
  +get_prop(torque_relative, Physical) ->
  +	Physical#physical.torque_relative;
  +
  +get_prop(last_update, Physical) ->
  +	Physical#physical.last_update;
  +get_prop(linear_velocity, Physical) ->
  +	Physical#physical.linear_velocity;
  +get_prop(angular_velocity, Physical) ->
  +	Physical#physical.angular_velocity;
  +get_prop(spin, Physical) ->
  +	Physical#physical.spin;
  +
  +get_prop(mass, Physical) ->
  +	Physical#physical.mass;
  +get_prop(inverse_mass, Physical) ->
  +	Physical#physical.inverse_mass;
  +get_prop(inertia_tensor, Physical) ->
  +	Physical#physical.inertia_tensor;
  +get_prop(inverse_inertia_tensor, Physical) ->
  +	Physical#physical.inverse_inertia_tensor.
  +
  +%% ------------------------------------------------------------------------
  +%% Internal Helpers
   %% ------------------------------------------------------------------------
   
   -spec evaluate(TimeDelta, Velocity, Force, Spin, Torque, State) -> {Velocity, Force, Spin, Torque, State} when
  
positive.code: % -------------------------------------------------------------------------
  
  % external api
  -export([simulate/2]).
  
  % -------------------------------------------------------------------------
  
  
negative.code: 
  %% ------------------------------------------------------------------------
  
  simulate_internal(TimeDelta, State) ->
  	#physical{
  		position = Position,
  