This paper presents a mefhod for generating sh,ortest paths in cluttered envaronments, based on the Hamilton-Jaco bi-Bellman (HJB) equation.. Formulating the shortest obstacle avoidawe problem as a time optimal control problem, the shortest paths are generated by following the negative gradient of the return function, which satisfies the HJB equation. A method to generate near-optimal paths is also presented, based on a psuedo return function. Paths generated by this method are guaranteed to reach the goal, at which the psuedo return function is shown to have a un.ique minimum. The computation required t o generate the nearoptimal paths is substantially lower than those of traditional potential field methods, making it applicable to on-line obstacle avoidance. Ezamples with circular obstacles demonstrate close correlation between the near-optimal and optimal path,s, and the advantages of the proposed approach over traditional potential field methods.