bool isClosed(List<Vector3> points, {double tolerance = 1e-6}) => (points.first - points.last).normSquared() <= tolerance * tolerance;