completed functions to operate on triangles and rectangles

For some reason, the drawing library doesn't let you draw triangles. Sad :(