This is an alternative Simplify.js version to take coordinates as a nested array.