Circle

open class Circle : Primitive

A circle in the plane, oriented by which side counts as its interior — the 2D circle.

The grade-3 blade cx·e423 + cy·e431 + cz·e412 + cw·e321, the wedge of three round points. The constructor unitizes by the round weight |cw|, preserving its sign — the orientation: cw = −1 is the classic circle whose interior is the bounded disk, cw = +1 the inside-out circle whose interior is everything outside. Center and radius are first-class views (center, radius); a negative radius2 makes the circle imaginary — no real points, first-class data, never an error (see isImaginary). Orientation is data: negating all four components keeps the point set and swaps the interior, and equals distinguishes the two (canonical for unoriented equivalence). A round weight that rounds to zero is not a circle but the line (cx, cy, cz) — the constructor throws rather than build one. Components are stored raw at full Double precision; equals/hashCode compare rounded at the SCALE quantum.

Constructors

Link copied to clipboard
constructor(cx: Double, cy: Double, cz: Double, cw: Double)

Builds the circle (cx, cy, cz, cw), unitized and zero-sanitized.

constructor(centerX: Double, centerY: Double, radius: Double)

Builds a classic circle with the given center and radius.

Properties

Link copied to clipboard

The purely directional part of this circle — a Dipole at infinity.

Link copied to clipboard
open val canonical: Circle

The canonical representative of this circle — useful for unoriented equivalence.

Link copied to clipboard

The carrier, saturated for a circle — the whole plane, as the antiscalar weight cw.

Link copied to clipboard

The center of the circle, carrying its size — a RoundPoint.

Link copied to clipboard

The co-carrier — the circle's center as a FlatPoint, dropping the size.

Link copied to clipboard

The smallest circle containing this circle — itself, orientation-normalized to inside-out.

Link copied to clipboard
val cw: Double

The e321 round weight — −1 for a classic circle whose interior is the bounded disk, +1 for an inside-out circle whose interior is everything outside it.

Link copied to clipboard
val cx: Double

The e423 component — the center's x-coordinate for a classic circle; negated when inside-out.

Link copied to clipboard
val cy: Double

The e431 component — the center's y-coordinate for a classic circle; negated when inside-out.

Link copied to clipboard
val cz: Double

The e412 component — minus half the origin's power with respect to the circle, (radius² − ‖center‖²)/2, for a classic circle; negated when inside-out.

Link copied to clipboard

Whether this circle is imaginary — a negative squared radius, no real points.

Link copied to clipboard

Whether this circle is inside-out — its interior is everything outside the bounded disk.

Link copied to clipboard

The center's distance from the origin √(cx² + cy²) — 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 circle.

Functions

Link copied to clipboard
infix fun Circle.antiproject(dipole: Dipole): Circle

Circle antiproject Dipole => Circle
Returns the circle through the dipole's endpoints incident with this circle's pairing point on their perpendicular bisector.

infix fun Circle.antiproject(flatPoint: FlatPoint): Line

Circle antiproject FlatPoint => Line
Returns the line through the point running the circle's way at the point's bearing — perpendicular to the radial through it.

infix fun Circle.antiproject(point: RoundPoint): Line

Circle antiproject RoundPoint => Line
Returns the line through the point running the circle's way at the point's bearing — perpendicular to the radial through it.

Link copied to clipboard
infix operator fun Circle.contains(other: Circle): Boolean

Circle contains Circle => Boolean
Returns whether the other circle's region lies within the region this circle bounds, boundaries included — internal tangency and identical circles count.

infix operator fun Circle.contains(point: FlatPoint): Boolean

Circle contains FlatPoint => Boolean
Returns whether the point lies in the circle's interior or on the circle.

infix operator fun Circle.contains(point: RoundPoint): Boolean

Circle contains RoundPoint => Boolean
Returns whether the point lies in the circle's interior or on the circle.

Link copied to clipboard
infix fun Circle.contract(dipole: Dipole): RoundPoint

Circle contract Dipole => RoundPoint
Returns the round point pairing the circle against the dipole, on the endpoints' perpendicular bisector.

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

Circle contract FlatPoint => RoundPoint
Returns the circle's tangent direction at the point's bearing, as a point at infinity.

infix fun Circle.contract(point: RoundPoint): Dipole

Circle contract RoundPoint => Dipole
Returns the dipole where the circle crosses the radical axis between it and the point.

Link copied to clipboard
open fun copy(circle: Circle): Circle

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

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

Circle dot Circle => Double
Returns the raw inner product of two circles — zero exactly when they cross at right angles.

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

Rounded, orientation-sensitive identity: equal when every component matches at the SCALE quantum.

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 Circle.meet(other: Circle): Dipole

Circle meet Circle => Dipole
Returns the dipole of the two points where the circles cross — imaginary when they don't touch.

infix fun Circle.meet(line: Line): Dipole

Circle meet Line => Dipole
Returns the dipole of the two points where the circle crosses the line — imaginary when they miss.

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.