Try to avoid of flipping triangles to inside out by removing the first degenerate triangle
Use better approximation for xyz-coordinates
Create vertexes to form a full circle (duplicate the first vertex as the last vertex)
Fix vertex coordinate generation
Zoom out a bit
Decrease the amount of vertexes. The donut is drawn incorrecly with greater amount of vertexes
Still ad a bit more rotation, now the shape can be rotated full 360