geometry
Deterministic 1D/2D/3D geometry: distances, intersections, areas, volumes, angles, convex hull, point-in-polygon, rotations. Closed-form (not iterative), exact up to floating-point rounding, identical output for identical input. Use it instead of doing geometry yourself. Pass {op, ...args} with op one of: 1D: dist1,midpoint1,divide_point,divide_ratio,harmonic_conjugate,interval_length,interval_midpoint,interval_intersect,interval_union,interval_hull,interval_overlap_length,interval_contains,point_between | 2D: dist2,midpoint2,lerp2,line_from_points,point_line_distance,point_segment_distance,project_point_line,line_intersect,line_intersect_points,segment_intersect,segment_length,angle_3points,angle_vectors,line_angle,triangle_area,triangle_centroid,triangle_incenter,polygon_area,polygon_perimeter,polygon_centroid,point_in_polygon,convex_hull,polygon_is_convex,circle_from_3points,point_circle_position,circle_line_intersect,circle_circle_intersect,circle_measure,sector_area,rotate_point,reflect_point_line,scale_point,parallel_through,perpendicular_through,triangle_circumcenter,triangle_orthocenter,triangle_excenters,triangle_five_centers,euler_line,triangle_nine_point_circle,triangle_euler_inequality,triangle_medians,triangle_altitudes,triangle_bisector_lengths,cevian_concurrent,menelaus_collinear,power_of_point,radical_axis,polar_of_point,pole_of_line,ptolemy,miquel_point,napoleon_triangles,pick_theorem,cocircular_check,minimum_enclosing_circle,circumcircle | 3D: dist3,midpoint3,lerp3,plane_from_3points,point_plane_distance,project_point_plane,reflect_point_plane,coplanar,point_line_distance3,project_point_line3,line_plane_intersect,line_line_relation,plane_plane_intersect,tetra_volume,polygon_area3,face_normal,mesh_volume,sphere_from_4points,sphere_line_intersect,sphere_plane_intersect,sphere_measure,angle_vectors3,angle_line_plane,angle_plane_plane,rotate_axis,cross3,triple_product,tetrahedron_geometry,monge_point | any: distance,midpoint,lerp,norm,normalize,dot,cross,project,reject,translate,centroid,bbox,diameter,stewart_theorem,law_of_cosines,law_of_cosines_sas,law_of_sines,solve_triangle,heron_area,brahmagupta,golden_ratio,regular_polygon,regular_tetrahedron,newton_polytope,tropical_degree_bound,tropical_system_bound,regular_subdivision,bernstein_bound,tropical_bezout_bound,sphere_equation,polynomial_equation. The remaining args are passed flat and depend on op (p, q, a, b, c, d, r, poly, pts, angle, lambda, center, axis, segment, a1,b1,c1,a2,b2,c2, ...). Send an unknown op to receive the full catalog with every signature. READ trust.trustLevel: exact = safe to use directly; definitely_none = computed proof that there is NO intersection, safe to state as a conclusion; degenerate = the INPUT is degenerate (parallel / collinear / coplanar / coincident), do NOT invent a value — report the degeneracy instead.