Click or drag to resize
Accord.NET (logo)

PointsCloud Class

Set of tools for processing collection of points in 2D space.
Inheritance Hierarchy
SystemObject
  Accord.Math.GeometryPointsCloud

Namespace:  Accord.Math.Geometry
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static class PointsCloud
Request Example View Source

The PointsCloud type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberQuadrilateralRelativeDistortionLimit
Relative distortion limit allowed for quadrilaterals, [0.0, 0.25].
Top
Methods
  NameDescription
Public methodStatic memberFindQuadrilateralCorners
Find corners of quadrilateral or triangular area, which contains the specified collection of points.
Public methodStatic memberGetBoundingRectangle
Get bounding rectangle of the specified list of points.
Public methodStatic memberGetCenterOfGravity
Get center of gravity for the specified list of points.
Public methodStatic memberGetFurthestPoint
Find furthest point from the specified point.
Public methodStatic memberGetFurthestPointFromLine(IEnumerableIntPoint, IntPoint, IntPoint)
Find the furthest point from the specified line.
Public methodStatic memberGetFurthestPointFromLine(IEnumerableIntPoint, IntPoint, IntPoint, Single)
Find the furthest point from the specified line.
Public methodStatic memberGetFurthestPointsFromLine(IEnumerableIntPoint, IntPoint, IntPoint, IntPoint, IntPoint)
Find two furthest points from the specified line.
Public methodStatic memberGetFurthestPointsFromLine(IEnumerableIntPoint, IntPoint, IntPoint, IntPoint, Single, IntPoint, Single)
Find two furthest points from the specified line.
Public methodStatic memberShift
Shift cloud by adding specified value to all points in the collection.
Top
Remarks

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 );
See Also