phetsims / wave-on-a-string

"Wave on a String" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/wave-on-a-string
GNU General Public License v3.0
7 stars 8 forks source link

Visual string should interpolate between model states #14

Closed jonathanolson closed 10 years ago

jonathanolson commented 10 years ago

The Flash version kept track of where it was between model steps, and linearly interpolated between the latest two: var yPresent = (1-ratio)_myString.yLast[i]+ratio_myString.yNow[i];

When using the lowest tension with slow motion, there should still be a smooth animation (mostly due to the interpolation).