Lex I: Corpus omne perseverare in statu suo quiescendi vel movendi uniformiter in directum, nisi quatenus a viribus impressis cogitur statum illum mutare. (Isaac Newton 1687)
In 1687 Isaac Newton wrote in the Principia Mathematica "An object at rest will remain at rest unless acted upon by an external and unbalanced force. An object in motion will remain in motion unless acted upon by an external and unbalanced force." This law implies that it is possible to select a reference frame, called an inertial reference frame, in which a free particle moves without any change in velocity. The First Law is often simplified as follows: An object in motion will remain in motion unless acted upon by another force.
The Ejs implementation of Newton's first law is very simple. The Evolution workpanel merely advances the x and y positions and time.
x = x + vx*dt; y = y + vy*dt; t = t + dt;
What is interesting about this Ejs model is that dragging the on-screen ball or the arrow automatically change the model's variables. Double click on the green arrow in the Launcher table of contents tree to run the First Law model. You can drag the particle to set its position and you can drag the arrow to set the particle's velocity.