This project is a graphical editor focused on creating, editing, and managing single polygons or curvilinear polygons with detailed constraint-handling capabilities and Bezier segment support. The editor includes specific features for polygon manipulation and constraint-based editing.
Supports one polygon per scene. Allows creation of new polygons, as well as deletion and modification of existing one.
One can move vertices and control points of Bezier segments, add vertices along edges, and remove vertices. To modify an edge leftclick on it and the menu with options shows up. Move the entire polygon by dragging with the left mouse button.
Constraints include horizontal/vertical edges or edges with a specified length. Users can set custom edge lengths via an edit window, with the current length as the default. Only one constraint per edge can be added, adjacent edges cannot both be horizontal or vertical. Adding or removing vertices along an edge removes existing constraints and updates adjacent edge types.
In the edge-editing window you can change the edge into a 3rd-degree Bezier segment.
Apply continuity requirements at vertices adjacent to Bezier segments:
G0: Positional continuity.
G1: Tangent vector continuity.
C1: Full tangent vector continuity.
Straight segment rendering supports both a library-based algorithm and a custom implementation of Bresenham's algorithm. Bezier segments are drawn with a fast, iterative algorithm.