You can assume the stationary object as a spring with the spring constant k to model the force,
then the force will depends on the displacement\vec{x}, i.e.  \vec{F}=-k \vec{x}.