3d image rotation in python