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.

Gis

Tool Description
SHAPELY_AREA Calculate the area of a geometry.
SHAPELY_BUFFER Returns a representation of all points within a given distance of the this geometric object.
SHAPELY_CONTAINS Returns True if the first geometry contains the second.
SHAPELY_CONVEX_HULL Returns the smallest convex polygon that contains all the points in the object.
SHAPELY_DISTANCE Calculate the minimum distance between two geometries.
SHAPELY_INTERSECT Returns a representation of the intersection of this object with another geometric object.
SHAPELY_LINESTRING Create a geometric line string from a list of points.
SHAPELY_PLOT Plot geometries and return an image.
SHAPELY_POINT Create a geometric point.
SHAPELY_POLYGON Create a geometric polygon from a shell of points and optional holes.
SHAPELY_SIMPLIFY Returns a simplified representation of the geometric object.
SHAPELY_UNION_ALL Returns the union of all geometries in the input list.

Triangle Solvers

Tool Description
TRI_AAAS Solve a triangle from three angles and one side for scale.
TRI_SAS Solve a triangle from two sides and their included angle.
TRI_SOLVE Solve a triangle from any valid combination of three known side/angle values.
TRI_SSA Solve a triangle from two sides and a non-included angle using SSA branch selection.
TRI_SSS Solve a triangle from three known side lengths.

Trig Identities

Tool Description
TRIG_EXPAND Expand trigonometric compound-angle expressions into component terms.
TRIG_FU Simplify trigonometric expressions using the Fu transformation pipeline.
TRIG_TR1 Rewrite secant and cosecant into reciprocal cosine and sine forms.
TRIG_TR10 Expand sine and cosine of summed angles into separated component terms.
TRIG_TR2 Rewrite tangent and cotangent into sine-cosine ratio forms.
TRIG_TR3 Normalize trig signs and induced odd/even identity forms.
TRIG_TR4 Evaluate exact trigonometric values at standard special angles.
TRIG_TR5 Replace even powers of sine using a cosine-based identity.
TRIG_TR6 Replace even powers of cosine using a sine-based identity.
TRIG_TR7 Apply power-reduction to cosine-squared terms.
TRIG_TR8 Convert products of sine and cosine terms into sum or difference forms.
TRIG_TR9 Convert sums of sine or cosine terms into product forms.
TRIG_TRIGSIMP Simplify a trigonometric expression using identity transformations.