modified the polygon class and added the line and lineMesh classes