Note: this implementation is not robust for angles very close to 90 degrees.
The circumcentre does not necessarily lie within the triangle. For example, the circumcentre of an obtuse isosceles triangle lies outside the triangle.
This method uses an algorithm due to J.R.Shewchuk which uses normalization to the origin to improve the accuracy of computation. (See Lecture Notes on Geometric Robustness, Jonathan Richard Shewchuk, 1999).
The circumcentre does not necessarily lie within the triangle. For example, the circumcentre of an obtuse isosceles triangle lies outside the triangle.
This method uses DD extended-precision arithmetic to provide more accurate results than circumcentre(Coordinate, Coordinate, Coordinate)
The incentre always lies within the triangle.
The centroid always lies within the triangle.
The signed area value can be used to determine point orientation, but the implementation in this method is susceptible to round-off errors. Use Orientation.index(Coordinate, Coordinate, Coordinate) for robust orientation calculation.
This method can be used to interpolate the Z-value of a point inside a triangle (for example, of a TIN facet with elevations on the vertices).
Note: this implementation is not robust for angles very close to 90 degrees.
The circumcentre does not necessarily lie within the triangle.
This method uses an algorithm due to J.R.Shewchuk which uses normalization to the origin to improve the accuracy of computation. (See Lecture Notes on Geometric Robustness, Jonathan Richard Shewchuk, 1999).
The centroid always lies within the triangle.
The signed area value can be used to determine point orientation, but the implementation in this method is susceptible to round-off errors. Use Orientation.index(Coordinate, Coordinate, Coordinate) for robust orientation calculation.
This method can be used to interpolate the Z-value of a point inside this triangle (for example, of a TIN facet with elevations on the vertices).