Update geometry

Added various methods to the Polygon class to be inherited by the
Rectangle and Triangle classes.