GeoSys is a header-only analytic geometry library in C++ with a native GTK desktop app for school use.
- Templated 2D primitives: points, vectors, lines, segments, circles, polygons, and bounding boxes
- Algebra utilities: dot product, cross product, normalization, angle calculations
- Geometry operations: distances, projections, reflections, orientation, triangle area, intersections
- Higher-level analysis: polygon perimeter, polygon centroid, convex hull, triangle centroid, incenter, circumcenter
- Desktop GUI: interactive calculator and sketch area for common classroom geometry tasks
include/
geom.hpp
geom/
point.hpp
vector.hpp
line.hpp
segment.hpp
circle.hpp
polygon.hpp
bounding_box.hpp
operations.hpp
utils.hpp
examples/
demo.cpp
apps/
geosys_school_gui.cpp
Requirements:
- CMake 3.14+
- A C++17 compiler
- GTK 3 development files for the GUI target
Build everything:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildConsole demo:
./build/geom_demoSchool GUI:
./build/geosys_school_gui- Core: distance, midpoint, orientation, triangle area
- Lines: line-line intersection from two point pairs
- Triangle: centroid, incenter, circumcenter, circumcircle
- Circles: area, center distance, circle-circle intersections
- Polygon: area, perimeter, centroid, bounding box, convex hull
- The library is header-only, so you can include
geom.hppin your own exercises or projects. - Floating-point comparisons use configurable epsilon helpers from
utils.hpp. - The GUI draws the current problem state so you can visually check your answers during homework or class prep.