algorithm-archivists / algorithm-archive

A collaborative book on algorithms
https://www.algorithm-archive.org
MIT License
2.34k stars 351 forks source link

Verlet Integration Code Doesn't Match Chapter Text #804

Open foldsters opened 3 years ago

foldsters commented 3 years ago

The chapter leading up to the first code snippet describes finding the next x-position using classic Verlet, but the code snippet (which implements a function simply called 'verlet' in many of the languages) does not return the next x-position, but actually demonstrates a time-of-flight algorithm without any context for it up to that point.

One would have to read all the way to the end of the chapter (or have watched the video) to understand what problem the code is actually solving.

leios commented 3 years ago

Right, I see the problem. I should probably rephrase the chapter so that it's clear we are solving for t the whole time.