added in a bounds object, and completed core routines for triangles