Manipulator joint trajectories are planned to make an arbitrary cost function as good as possible in consideration of physical constraints based on kinematics and dynamics of a manipulator system. An algorithm presented in this paper is an iteratively improving method using the local controllability of B spline. It can be also applied to the case that some points are specified and joint trajectories must pass through those points. This algorithm is applied to an example of trajectory planning of a manipulator with two links and two degrees of freedom.