Modify ch04/ex09 to rotate smoothly