A 2d floating point arithmetic point-in-circle test.

Namespace:  ceometric.ComputationalGeometry
Assembly:  ceometric.ComputationalGeometry (in ceometric.ComputationalGeometry.dll) Version: 2.4.0.0 (2.4.0.0)

Syntax

C#
public static double InCircleArbitrary(
	Point p1,
	Point p2,
	Point p3,
	Point point
)
Visual Basic (Declaration)
Public Shared Function InCircleArbitrary ( _
	p1 As Point, _
	p2 As Point, _
	p3 As Point, _
	point As Point _
) As Double
Visual C++
public:
static double InCircleArbitrary(
	Point^ p1, 
	Point^ p2, 
	Point^ p3, 
	Point^ point
)

Parameters

p1
Type: ceometric.VectorGeometry..::.Point
A 2d point on the circumference of a circle.
p2
Type: ceometric.VectorGeometry..::.Point
A 2d point on the circumference of a circle.
p3
Type: ceometric.VectorGeometry..::.Point
A 2d point on the circumference of a circle.
point
Type: ceometric.VectorGeometry..::.Point
A 2d point.

Return Value

For a clockwise OR counterclockwise orientation of the points p1, p2 and p3 defining a circle, the predicate is
  • positive if point lies inside the circle.
  • zero if point lies on the circumference of the circle.
  • negative if point lies outside the circle.

Remarks

Due to floating point arithmetic, this predicate is not is not reliable for near-degenerate cases.

See Also