/ Computational Geometry Primitives

The package provides some basic geometric types in the cg submodule.

Package Features

  • Provides types: Point, Segment, Line, Polygon.

Basic geometric types

FrechetDist.cg.LineType
Line in D dimensions.

`p` is a point on the line and `u` is the direction vector (not
necessarily normalized). Parametrised as $p + ut$
FrechetDist.cg.PointType
Point

Point in D dimensions. Implemented currently as a struct with
StaticArray for values. It is templated, with `N` for dimension,
and `T` for underlying type.

Functions

FrechetDist.cg.Segment_get_bisection_pointMethod
Segment_get_bisection_point -> Bool, Real, Point

Computes the intersection point of the segment `seg` with the

bisector plane between p and q.

Returns

The first argument returns whether the segment intersects the bisector, the pramaterized location (tm), and the intersection piont itself.

FrechetDist.cg.dist_seg_nn_pointMethod
dist_seg_nn_point

Returns the distance to the closest point lying on the segment induced by the first two points, to the query point. By avoiding creating the segment iself, it is hopeflly more efficient.

FrechetDist.cg.induced_seg_nn_pointMethod
induced_seg_nn_point

Returns the closest point to the segment induced by the first two points, to the query point. By avoiding creating the segment iself, it is hopeflly more efficient.

FrechetDist.cg.pointMethod
point( args... )

A flexible constructor for a point specified by the arguments. Thus point( 2.0, 3.0, 4.0 ) defined the 3d point (2.0, 3.0, 4.0). Or similarly, point( 2.0, 1.0 ) would create a 2d point.