Cythonized torus generation. 300 ms to 7 ms.

Signed-off-by: Xiaomao Chen <xiaomao5@live.com>