-
Notifications
You must be signed in to change notification settings - Fork 99
points2d
David Legland edited this page Nov 19, 2018
·
2 revisions
A point is defined by its two cartesian coordinate, put into a row vector of 2 elements:
P = [x y];
Collections of points are stored in a matrix with two columns, one for the x-coordinate, one for the y-coordinate.
PTS = [x1 y1 ; x2 y2 ; x3 y3];
Example:
P = [5 6];
centroid - Compute centroid (center of mass) of a set of points
midPoint - Middle point of two points or of an edge
boundingBox - Bounding box of a set of points
clipPoints - Clip a set of points by a box
circumCenter - Circumcenter of three points
isCounterClockwise - Compute relative orientation of 3 points
polarPoint - Create a point from polar coordinates (rho + theta)
angle2Points - Compute horizontal angle between 2 points
angle3Points - Compute oriented angle made by 3 points
angleSort - Sort points in the plane according to their angle to origin
distancePoints - Compute distance between two points
minDistancePoints - Minimal distance between several points
hausdorffDistance - Hausdorff distance between two point sets
nndist - Nearest-neighbor distances of each point in a set
transformPoint - Transform a point with an affine transform
drawPoint - Draw the point on the axis.