Logo Euclid

Points2D Type

A type containing only static member functions for operating on multiple 2D points or set of 2D points. Aka point-clouds

Static members

Static member Description

Points2D.closestOfTwo pt1 pt2 referencePoint

Full Usage: Points2D.closestOfTwo pt1 pt2 referencePoint

Parameters:
    pt1 : Pt
    pt2 : Pt
    referencePoint : Pt

Returns: Pt

Returns the closest of two 2D points to a given reference 2D point. If both points are equidistant the first point is returned.

pt1 : Pt
pt2 : Pt
referencePoint : Pt
Returns: Pt

Points2D.closestPoint (pts, pt)

Full Usage: Points2D.closestPoint (pts, pt)

Parameters:
Returns: Pt

Returns the closest 2D point from a point list to a given 2D point.

pts : IList<Pt>
pt : Pt
Returns: Pt

Points2D.closestPointIdx (pts, pt)

Full Usage: Points2D.closestPointIdx (pts, pt)

Parameters:
Returns: int

Returns the closest 2D point index from a 2D point list to a given 2D point.

pts : IList<Pt>
pt : Pt
Returns: int

Points2D.closestPointsIdx (xs, ys)

Full Usage: Points2D.closestPointsIdx (xs, ys)

Parameters:
Returns: int * int

Returns the indices of the 2D points that are closest to each other.

xs : IList<Pt>
ys : IList<Pt>
Returns: int * int

Points2D.getSignedArea ps

Full Usage: Points2D.getSignedArea ps

Parameters:
Returns: float

The sign is negative if the loop is clockwise. Last and first point should be the same.

ps : IList<Pt>
Returns: float

Points2D.minDistBetweenPointSets (xs, ys)

Full Usage: Points2D.minDistBetweenPointSets (xs, ys)

Parameters:
Returns: float

Given two lists of 2D points finds the pair that are closest to each other and returns their distance.

xs : IList<Pt>
ys : IList<Pt>
Returns: float

Points2D.mostDistantPoint (findPointFrom, checkAgainst)

Full Usage: Points2D.mostDistantPoint (findPointFrom, checkAgainst)

Parameters:
Returns: Pt

Find the 2D point that has the biggest distance to any 2D point from another set.

findPointFrom : IList<Pt>
checkAgainst : IList<Pt>
Returns: Pt

Points2D.mostDistantPointIdx (findPointFrom, checkAgainst)

Full Usage: Points2D.mostDistantPointIdx (findPointFrom, checkAgainst)

Parameters:
Returns: int * int

Find the index of the 2D point that has the biggest distance to any 2D point from the other set. Basically the most lonely point in 'findPointFrom' list with respect to 'checkAgainst' list. Returns findPointFromIdx * checkAgainstIdx

findPointFrom : IList<Pt>
checkAgainst : IList<Pt>
Returns: int * int

Type something to start searching.