Eliminate double of cap triangles
Implement the transformStack. (god I love c++)