Circle2

References
public class Circle2
Represents a circle, defined by origin and radius

Constructors

Circle2

#
public Circle2()
Blank constructor

Circle2

#
public Circle2(Circle2 other)
Duplicate another circle.
other (Circle2)Circle to mimic

Circle2

#
public Circle2(Node2 A, Node2 B, Node2 C)
Create a circle through 3 points.
A (Node2)First point
B (Node2)Second point
C (Node2)Third point

Circle2

#
public Circle2(Node2 origin, double radius)
Create a circle from origin and radius
origin (Node2)Origin point of circle
radius (double)Radius of circle (>0.0 for valid circle)

Fields

O

#
public Node2 O

R

#
public double R

Properties

Area

#
public double Area { get; }

Circumference

#
public double Circumference { get; }

Methods

Circle3Pt

#
public static bool Circle3Pt(double ax, double ay, double bx, double by, double cx, double cy, ref double ox, ref double oy, ref double r2)
Fit a circle through three 2d points.
ax (double)X of first point
ay (double)Y of first point
bx (double)X of second point
by (double)Y of second point
cx (double)X of third point
cy (double)Y of third point
ox (ref double)X of origin
oy (ref double)Y of origin
r2 (ref double)Radius squared
True if circle is valid, False if points are coincident or colinear.

ClosestPointTo

#
public double ClosestPointTo(double x, double y)
x (double)
y (double)

ClosestPointTo

#
public double ClosestPointTo(Node2 pt)
pt (Node2)

ClosestPointTo

#
public Node2 ClosestPointTo(double x, double y, ref double t)
x (double)
y (double)
t (ref double)

ClosestPointTo

#
public Node2 ClosestPointTo(Node2 pt, ref double t)
pt (Node2)
t (ref double)

Contains

#
public Containment Contains(double x, double y)
x (double)
y (double)

Contains

#
public Containment Contains(Node2 pt)
pt (Node2)

Duplicate

#
public Circle2 Duplicate()
Create an exact duplicate of this circle.

Intersect

#
public LineCircleX Intersect(Line2 line, ref double l0, ref double l1, ref double a0, ref double a1)
line (Line2)
l0 (ref double)
l1 (ref double)
a0 (ref double)
a1 (ref double)

Intersect

#
public LineCircleX Intersect(Line2 line, ref double l0, ref double l1)
line (Line2)
l0 (ref double)
l1 (ref double)

PointAt

#
public Node2 PointAt(double t)
Get the point ON the circle at parameter t
t (double)Parameter to evaluate at: (0.0, t, 2pi)

TangentAt

#
public Vec2 TangentAt(double t)
t (double)