This paper presents a new method to generate tool paths for machining freeform surfaces represented either as parametric surfaces or as triangular meshes. This method allows for the optimal tradeoff between the preferred feed direction field and the constant scallop height, and yields a minimized overall path length. The optimality is achieved by formulating tool path planning as a Poisson problem that minimizes a simple, quadratic energy. This Poisson formulation considers all tool paths at once, without resorting to any heuristic sampling or initial tool path choosing as in existing methods, and is thus a globally optimal solution. Finding the optimal tool paths amounts to solving a well-conditioned sparse linear system, which is computationally convenient and efficient. Tool paths are represented with an implicit scheme that can completely avoid the challenging topological issues of path singularities and self-intersections seen in previous methods. The presented method has been validated with a series of examples and comparisons.