circumcentre method

Coordinate circumcentre()

Computes the circumcentre of this triangle. The circumcentre is the centre of the circumcircle, the smallest circle which encloses the triangle. It is also the common intersection point of the perpendicular bisectors of the sides of the triangle, and is the only point which has equal distance to all three vertices of the triangle.

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).

@return the circumcentre of this triangle

Implementation

Coordinate circumcentre() {
  return circumcentreStatic(this.p0, this.p1, this.p2);
}