  We proposed an algorithm for solving Hamilton-Jacobi equation associated to
an optimal trajectory problem for a vehicle moving inside the pre-specified
domain with the speed depending upon the direction of the motion and current
position of the vehicle. The dynamics of the vehicle is defined by an ordinary
differential equation, the right hand of which is given by product of control(a
time dependent fuction) and a function dependent on trajectory and control. At
some unspecified terminal time, the vehicle reaches the boundary of the
pre-specified domain and incurs a terminal cost. We also associate the
traveling cost with a type of integral to the trajectory followed by vehicle.
We are interested in a numerical method for finding a trajectory that minimizes
the sum of the traveling cost and terminal cost. We developed an algorithm
solving the value function for general trajectory optimization problem. Our
algorithm is closely related to the Tsitsiklis's Fast Marching Method and J. A.
Sethian's OUM and SLF-LLL[1-4] and is a generalization of them. On the basis of
these results, We applied our algorithm to the image processing such as
fingerprint verification.
