Computes orbits in javascript!