PointsCloud Class |
Namespace: Accord.Math.Geometry
The PointsCloud type exposes the following members.
Name | Description | |
---|---|---|
QuadrilateralRelativeDistortionLimit |
Relative distortion limit allowed for quadrilaterals, [0.0, 0.25].
|
Name | Description | |
---|---|---|
FindQuadrilateralCorners |
Find corners of quadrilateral or triangular area, which contains the specified collection of points.
| |
GetBoundingRectangle |
Get bounding rectangle of the specified list of points.
| |
GetCenterOfGravity |
Get center of gravity for the specified list of points.
| |
GetFurthestPoint |
Find furthest point from the specified point.
| |
GetFurthestPointFromLine(IEnumerableIntPoint, IntPoint, IntPoint) |
Find the furthest point from the specified line.
| |
GetFurthestPointFromLine(IEnumerableIntPoint, IntPoint, IntPoint, Single) |
Find the furthest point from the specified line.
| |
GetFurthestPointsFromLine(IEnumerableIntPoint, IntPoint, IntPoint, IntPoint, IntPoint) |
Find two furthest points from the specified line.
| |
GetFurthestPointsFromLine(IEnumerableIntPoint, IntPoint, IntPoint, IntPoint, Single, IntPoint, Single) |
Find two furthest points from the specified line.
| |
Shift |
Shift cloud by adding specified value to all points in the collection.
|
The static class contains set of routines, which provide different operations with collection of points in 2D space. For example, finding the furthest point from a specified point or line.
Sample usage:
// create points' list List<IntPoint> points = new List<IntPoint>( ); points.Add( new IntPoint( 10, 10 ) ); points.Add( new IntPoint( 20, 15 ) ); points.Add( new IntPoint( 15, 30 ) ); points.Add( new IntPoint( 40, 12 ) ); points.Add( new IntPoint( 30, 20 ) ); // get furthest point from the specified point IntPoint p1 = PointsCloud.GetFurthestPoint( points, new IntPoint( 15, 15 ) ); Console.WriteLine( p1.X + ", " + p1.Y ); // get furthest point from line IntPoint p2 = PointsCloud.GetFurthestPointFromLine( points, new IntPoint( 50, 0 ), new IntPoint( 0, 50 ) ); Console.WriteLine( p2.X + ", " + p2.Y );