moved to OO, optimized generateTriangles, and now only using one Graphics object