Vertex calculator
The vertex calculator is a utility for performing geometric calculations. First, input parameters are pushed onto the "vertex stack", where each entry contains a 2d location (x,y); then a certain calculation can be performed. For example, you can push the three points of a triangle onto the stack and get result "area" of that triangle.
Operation Comment
Line (2 entries)orientation 2 o'clock = 30 deg; 4 o'clock = -30 deg
Triangle (3 entries: A, B, C)innercircle centerx innercircle centery innercircle radius outercircle centerx outercircle centery outercircle radius angle Angle at B (0..180 deg) deviation Deviation at B when travelling A-B-C (range -180..0..180 deg, left is negative) height Triangle height at B onto A-C
Partial path (>=3 entries):
Finds the shortest line (spark line) from a point to a segmented line (=path). Stack must contain first the path, then the point. The spark line meets the path at the "impact point".partialpath Travel distance along path until impact point partialpath offset length of spark line partialpath impactx partialpath impacty partialpath leftedge index of neighbor vertex towards start of path (zero-based) partialpath rightedge index of neighbor vertex towards end of path (zero-based)
Segmented line and polygon(>=3 entries):
area polygon area (if segments cross, sub-areas are subtracted) perimeter perimeter of polygon (includes closing segment) totalpath sum of all line segments
Two lines A-B and C-D (4 entries):
crosspointx crosspointy