Smooth trajectory generation for 5-axis CNC machine tools