> Python is not Scheme, it can't optimize tail calls. Use explicit iteration.

This function is almost similar to the function that used in the physics module. But in the previous commit I implemented a function that uses explicit iteration. I can simplify it a little bit. On the other hand if I try to change this function to use explicit iteration this will be more complex. So what should I do?