TriangleTracing works, needs to be converted to library