Fix functions for getting bounding points of triangle