Documentation

Overview

    package predicates handles the geometric predicates for a delaunay triangulation

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type OrientationKind

    type OrientationKind int

      OrientationKind indicates how three points are located in respect to each other.

      const (
      	// Counterclockwise
      	CCW OrientationKind = iota
      	// Clockwise
      	CW
      	Colinear
      	IndeterminateOrientation
      )

      func Orientation

      func Orientation(x1, y1, x2, y2, x, y float64) OrientationKind

        Orientation returns how the point (x,y) is oriented with respect to the line defined by the points (x1,y1) and (x2,y2).

        func (OrientationKind) String

        func (o OrientationKind) String() string

        type RelativePosition

        type RelativePosition int

          RelativePosition is the position of a point relative to a circle

          const (
          	// Inside the circle
          	Inside RelativePosition = iota
          	// On the circle
          	On
          	// Outside the circle
          	Outside
          	IndeterminatePosition
          )

          func Incircle

          func Incircle(x1, y1, x2, y2, x3, y3, x, y float64) RelativePosition

            Incircle determines the relative position of the point (x,y) in relation to the circle formed by the three points (x1,y1),(x2,y2) and (x3,y3). The three points have to be ordered counterclockwise or Outside and Inside will be reversed.

            func (RelativePosition) String

            func (p RelativePosition) String() string