tailot's picture
three certified domains: Euclidean constructions, exact predicates, implicit conics
166cfb1 verified
Raw History Blame Contribute Delete
2.05 kB
"""Deterministic exact kernels of Euclidean plane geometry."""
from .affine import Affine, apply_all, rational_rotation
from .circumcircle import Circumcircle, circle_through_three_points, vandermonde_matrix
from .common import (
Circle,
DegenerateConfigurationError,
GeometryError,
Line,
NoSolutionError,
Point,
Surd,
SurdPoint,
to_fraction,
)
from .conics import (
Conic,
ConicClass,
ConicError,
LineConicResult,
asymptotes,
center as conic_center,
check_factorization,
classify as conic_classify,
conic_from_coefficients,
conic_from_polys,
factor_lines,
line_conic,
pole_of_line,
polar_line,
tangent_line,
)
from .line_intersection import LineIntersection, intersect_lines, intersection_point
from .predicates import (
ConvexHull,
convex_hull,
incircle_sign_ccw,
incircle_test,
is_ccw,
is_strictly_convex,
orientation,
orientation_of_triangle,
point_in_convex_polygon,
polygon_area2,
)
from .power_of_point import (
Secant,
power_of_point,
position,
secant_products_equal,
secant_through,
tangent_secant_relation,
)
from .tangents import TangentResult, tangents_from_point
from .triangle_centers import (
TriangleCenters,
altitude,
centroid,
circumcenter,
median,
orthocenter,
triangle_centers,
)
KERNEL_NAMES = (
"line_intersection",
"circumcircle",
"tangents",
"triangle_centers",
"power_of_point",
"affine",
)
# The six Euclidean kernels above are the ones the Rete productions of solver.py drive.
# The tracks of this dataset run their own families on top of them -- the orientation,
# incircle and hull predicates, the six families reading an implicit conic, and the
# classical triangle constructs of kernels/classical.py -- and the name a record carries
# in its kernel field is the family that produced it, listed with its domain by the
# DOMAIN_OF_KERNEL table of tools/generate_dataset.py and pinned by the suite there.