Slant surface generation, fixing Xiong's old code