Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Circle ¶
type Circle struct { A float64 C complex128 D float64 }
A Circle and a line are the same in this world. They are represented by an hermitian 2x2 matrix (a, b, c, d) hence b = cmplx.Conj(c) and a and d are real numbers. Lines have a = 0. The matrix determinant equals the negative of the radius square. When determinant is zero, the circle degenerates to a line. Imaginary circles exist, they have negative radius.
func NewCircle ¶
func NewCircle(center complex128, radius float64) Circle
NewCircle constructor. When radius is zero it will degenerate to a point, when radius is negative it will create an imaginary circle.
func NewLine ¶
func NewLine(p complex128, q complex128) Circle
NewLine constructor, returns a line that is the locus of points equidistant from the given p, q points.
type Point ¶
type Point struct {
Z, W complex128
}
A Point is represented by the couple p = (z, w) of two complex numbers where two points are equal if (z, w) = λ (z', w').
func LFT ¶
LFT computes a Linear fractional transformation (https://en.wikipedia.org/wiki/Linear_fractional_transformation).
func NewPoint ¶
func NewPoint(Z complex128) *Point
NewPoint is a Point constructor. It only takes one Z argument, since W defaults to 1, i.e. the point is already normalized.