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.center pts

Full Usage: Points2D.center pts

Parameters:
Returns: Pt

Finds the center, mean, or average point.

pts : IList<Pt>
Returns: Pt

Points2D.closestPoint pt pts

Full Usage: Points2D.closestPoint pt pts

Parameters:
Returns: Pt

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

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

Points2D.closestPointIndex pt pts

Full Usage: Points2D.closestPointIndex pt pts

Parameters:
Returns: int

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

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

Points2D.closestPointsIndices xs ys

Full Usage: Points2D.closestPointsIndices 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.minDistanceBetweenPointSets xs ys

Full Usage: Points2D.minDistanceBetweenPointSets 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 checkAgainst findPointFrom

Full Usage: Points2D.mostDistantPoint checkAgainst findPointFrom

Parameters:
Returns: Pt

Find the 2D point in 'findPointFrom' that has the biggest distance to any 2D point in 'checkAgainst'. The list to check against comes first, the list to find the point from comes last.

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

Points2D.mostDistantPointIndices checkAgainst findPointFrom

Full Usage: Points2D.mostDistantPointIndices checkAgainst findPointFrom

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. The list to check against comes first, the list to find the point from comes last. Returns findPointFromIdx * checkAgainstIdx

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

Type something to start searching.