Added code to triangulate endcaps

(important for surfrevs of < 360 degrees)