RoundPoint

open class RoundPoint : Primitive

A point in the plane, optionally carrying a size — the 2D round point.

The grade-1 vector ax·e1 + ay·e2 + az·e3 + aw·e4. The constructor unitizes by the round weight az, so a finite point stores its Euclidean coordinates in (ax, ay). aw is the conformal component; measured against the null lift aw = (ax² + ay²)/2 it gives the squared radius radius2 — zero for a plain Euclidean point, negative for an imaginary one (see isImaginary). A weight that rounds to zero places the point at infinity: a direction with magnitude, kept raw. Components are stored raw at full Double precision; equals/hashCode compare rounded at the SCALE quantum.

Inheritors

Constructors

Link copied to clipboard
constructor(ax: Double, ay: Double, az: Double, aw: Double)

Builds the round point (ax, ay, az, aw), unitized and zero-sanitized.

constructor(ax: Double, ay: Double)

Builds the Euclidean point (ax, ay) with its conformal lift.

Properties

Link copied to clipboard

The attitude, degenerate for a point — pure weight, no direction.

Link copied to clipboard
val aw: Double

The e4 conformal component — (ax² + ay²)/2 for a plain Euclidean point.

Link copied to clipboard
val ax: Double

The e1 component — the Euclidean x-coordinate when finite.

Link copied to clipboard
val ay: Double

The e2 component — the Euclidean y-coordinate when finite.

Link copied to clipboard
val az: Double

The e3 round weight — 1 when finite; rounds to 0 at infinity (kept raw).

Link copied to clipboard

The flat point at this position — the carrier car(a) = e4 ∧ a.

Link copied to clipboard

The co-carrier, degenerate for a point — just its weight az.

Link copied to clipboard

The smallest circle containing this point — zero radius for a plain Euclidean point.

Link copied to clipboard

Whether this point lies at infinity — a direction with magnitude rather than a position.

Link copied to clipboard

Whether this point is imaginary — a negative squared radius, no real locus.

Link copied to clipboard

The Euclidean magnitude √(ax² + ay²) — raw.

Link copied to clipboard

The radius magnitude √(|radius2|) — raw, non-negative.

Link copied to clipboard

The squared radius — raw and signed; negative for an imaginary point.

Link copied to clipboard

This position as a FlatPoint — drops the conformal component.

Link copied to clipboard

This direction as a RoundDirection — the refinement carrying the at-infinity guarantee.

Functions

Link copied to clipboard
open fun copy(roundPoint: RoundPoint): RoundPoint

Returns this object rebuilt around the replacement geometry roundPoint — the hook the shape-preserving operations return through.

Link copied to clipboard
infix fun RoundPoint.distanceTo(flatPoint: FlatPoint): Double

RoundPoint distanceTo FlatPoint => Double
Returns the raw Euclidean distance between the round point's position and the flat point.

infix fun RoundPoint.distanceTo(line: Line): Double

RoundPoint distanceTo Line => Double
Returns the raw perpendicular distance from the point's position to the line.

RoundPoint distanceTo RoundPoint => Double
Returns the raw Euclidean distance between the two points' positions.

Link copied to clipboard
infix fun RoundPoint.dot(circle: Circle): Double

RoundPoint dot Circle => Double
Returns the raw point-against-circle probe: positive inside, zero on the circle, negative outside, for a finite point and a classic circle.

infix fun RoundPoint.dot(line: Line): Double

RoundPoint dot Line => Double
Returns the line's equation evaluated at the point: zero when the point lies on the line, the raw signed distance to it otherwise.

infix fun RoundPoint.dot(other: RoundPoint): Double

RoundPoint dot RoundPoint => Double
Returns the raw inner product of two round points — zero when two finite positions coincide, −½·d² when they sit d apart.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Rounded identity: equal when every component matches at the SCALE quantum.

Link copied to clipboard
infix fun RoundPoint.expand(circle: Circle): Dipole

RoundPoint expand Circle => Dipole
Returns the dipole holding the point and its inversion through the circle.

infix fun RoundPoint.expand(dipole: Dipole): Circle

RoundPoint expand Dipole => Circle
Returns the circle through the point whose inversion swaps the dipole's endpoints.

infix fun RoundPoint.expand(flatPoint: FlatPoint): Circle

RoundPoint expand FlatPoint => Circle
Returns the circle through the round point centered at the flat point.

infix fun RoundPoint.expand(line: Line): Dipole

RoundPoint expand Line => Dipole
Returns the dipole holding the point and its mirror image across the line.

Link copied to clipboard
open override fun hashCode(): Int

Returns the hash of the rounded components, consistent with equals.

Link copied to clipboard
infix fun RoundPoint.join(segment: Segment): Circle

RoundPoint join Segment => Circle
Returns the circle through the segment's endpoints and this point.

infix fun RoundPoint.join(dipole: Dipole): Circle

RoundPoint join Dipole => Circle
Returns the circle through the point and the dipole's endpoints.

infix fun RoundPoint.join(flatPoint: FlatPoint): Line

RoundPoint join FlatPoint => Line
Returns the line through both points.

infix fun RoundPoint.join(other: RoundPoint): Dipole

RoundPoint join RoundPoint => Dipole
Returns the dipole holding both points — this point as Dipole.start, other as Dipole.end.

Link copied to clipboard
operator fun RoundPoint.minus(other: RoundPoint): Direction

RoundPoint - RoundPoint => Direction
Returns the free vector from other's position to this point's position: the displacement that carries other onto this point.

Link copied to clipboard
infix fun RoundPoint.on(polygon: Polygon): Boolean

RoundPoint on Polygon => Boolean
Returns whether the point lies on the polygon's boundary.

infix fun RoundPoint.on(segment: Segment): Boolean

RoundPoint on Segment => Boolean
Returns whether the point lies on the segment itself, endpoints included.

infix fun RoundPoint.on(circle: Circle): Boolean

RoundPoint on Circle => Boolean
Returns whether the point lies on the circle.

infix fun RoundPoint.on(line: Line): Boolean

RoundPoint on Line => Boolean
Returns whether the point lies on the line.

Link copied to clipboard
infix fun RoundPoint.project(circle: Circle): RoundPoint

RoundPoint project Circle => RoundPoint
Returns the round point that pairs the point into the circle: on the radial line through the point, incident with the circle.

infix fun RoundPoint.project(dipole: Dipole): RoundPoint

RoundPoint project Dipole => RoundPoint
Returns the point of the dipole's carrier dividing the endpoints in the ratio of their squared distances from the given point.

infix fun RoundPoint.project(line: Line): RoundPoint

RoundPoint project Line => RoundPoint
Returns the point's perpendicular foot on the line, sized by the squared distance to it.

Link copied to clipboard
open override fun toString(): String

Returns the raw components — full stored precision, no rounding.

Link copied to clipboard

Returns the components rounded at the SCALE quantum — the debug-output convention of every primitive.