/* etoys acceleration vs Mathematical acceleration */ /* Select whole program and press [do it]! */ acc= 1.0; /* acceleration for both */ v1= 0.0; /* velocity for etoys version */ p1= 0.0; /* position for etoys version */ for (t= 0; t < 20; t++) { pre1= p1 p1 += v1; p2= 1/2 * acc * Math.pow(t, 2); show("etoys: " + pre1 + " + " + v1 + " = " + p1 + "\n"); show("math: 1/2 * " + acc + " * " + t + "^2 = " + p2 + "\n"); v1 += acc; }