Some optimal path planning algorithms for navigating mobile rectangular robot among obstacles and weighted regions are presented. The approach is based on a higher geometry maze routing algorithm. Starting from a top view of a workspace with obstacles, the so-called free workspace is first obtained by virtually expanding the obstacles in the image. After that, an 8-geomerty maze routing algorithm is applied to obtain an optimal collision-free path with linear time and space complexities. The proposed methods cannot only search an optimal path among various terrains but also find an optimal path for the 2-D piano mover's problem with 3 DOF. Furthermore, the algorithm can be easily extended to the dynamic collision avoidance problem among multiple autonomous robots or path planning in the 3-D space.