Refactored version of Triangles code from chapter 1 of Computer Graphics for Java Programmers