Geometry
Overview
Geometry studies the properties of shape, size, distance, and spatial relationships, from Euclidean triangles to computational operations on polygons and lines. In analytics and engineering workflows, geometric methods turn coordinate data and symbolic expressions into measurable quantities and solvable constraints. This category combines practical geospatial operations, triangle-solving utilities, and symbolic trigonometric transformations into one toolkit for modeling and computation. For background, see Geometry on Wikipedia.
Across these tools, the shared ideas are representation, transformation, and invariants: objects are represented as coordinates or expressions, transformed by algebraic or geometric rules, and evaluated through stable measures such as area, distance, angle, or identity equivalence. Triangle solvers use classical laws (sines and cosines) to recover unknown sides and angles from constrained inputs, while trigonometric simplifiers normalize expressions into forms that are easier to compare or evaluate. GIS functions operate on planar geometries encoded as WKT, where topological predicates and set-like operations define spatial relationships. Together, these concepts support both numeric workflows and symbolic reasoning.
Implementation relies mainly on three Python ecosystems: Shapely for computational geometry and GIS-style operations, trianglesolver for deterministic triangle reconstruction from partial measurements, and SymPy for symbolic trigonometric manipulation and simplification. Visualization support in Matplotlib underpins plotted geometry output. This mix makes the category useful for spreadsheet users who need robust math and spatial behavior without writing full analysis scripts.
The GIS group builds and analyzes planar objects from WKT with SHAPELY_POINT, SHAPELY_LINESTRING, and SHAPELY_POLYGON, then measures and transforms them using SHAPELY_AREA, SHAPELY_DISTANCE, SHAPELY_BUFFER, and SHAPELY_SIMPLIFY. Spatial set and topology workflows are covered by SHAPELY_INTERSECT, SHAPELY_UNION_ALL, SHAPELY_CONTAINS, and SHAPELY_CONVEX_HULL. SHAPELY_PLOT closes the loop by rendering one or more geometries for quick visual verification. In practice, this cluster supports footprint analysis, service-area approximation, boundary cleanup, and overlap checking in location and mapping tasks.
The triangle-solvers group addresses constrained triangle reconstruction with TRI_SSS, TRI_SAS, TRI_SSA, TRI_AAAS, and the general dispatcher TRI_SOLVE. These functions are most useful when field measurements provide only partial information and a complete triangle must be inferred consistently in radians. They apply the Law of Sines and Law of Cosines to produce side-angle solutions, including SSA branch handling when ambiguity exists. Common use cases include surveying calculations, force-triangle reconstruction, and geometry-driven parameter estimation.
The trigonometric identity group provides expression rewriting and simplification through TRIG_EXPAND, TRIG_TRIGSIMP, and the Fu strategy in TRIG_FU. Fine-grained canonical transformations are exposed via TRIG_TR1, TRIG_TR2, TRIG_TR3, TRIG_TR4, TRIG_TR5, TRIG_TR6, TRIG_TR7, TRIG_TR8, TRIG_TR9, and TRIG_TR10. These tools are especially effective for reducing symbolic complexity before differentiation, integration, equation solving, or exact-angle evaluation. They also help standardize equivalent formulas so downstream calculations and checks are more reliable.