Fast Robot Motion Generation Using Principal Components: Framework and Algorithms