public class PointCloud_2 extends PointCloud<Point_2>
| Constructor and Description |
|---|
PointCloud_2()
Create a new empty point cloud
|
PointCloud_2(java.util.ArrayList<Point_2> points)
Create a new point cloud (a copy) from a collection of points
|
PointCloud_2(int n)
Create a point cloud of size n
|
| Modifier and Type | Method and Description |
|---|---|
Point_2[] |
boundingBox()
Compute the bounding box (enclosing all points)
|
Point_2 |
max(int d)
Return the point with greatest coordinate value (in direction d)
|
Point_2 |
min(int d)
Return the point with smallest coordinate value (in direction d)
|
static PointCloud_2 |
pointsInCircle(int n)
Generate points inside a circle at random
|
add, dimension, listOfPoints, remove, sizepublic PointCloud_2()
public PointCloud_2(int n)
n - number of pointspublic PointCloud_2(java.util.ArrayList<Point_2> points)
a - list of points (stored as an ArrayList)public Point_2[] boundingBox()
boundingBox in class PointCloud<Point_2>public Point_2 max(int d)
max in class PointCloud<Point_2>d - dimension (0 or 1, corresponding to x or y axis)public Point_2 min(int d)
min in class PointCloud<Point_2>d - dimension (0 or 1, corresponding to x or y axis)public static PointCloud_2 pointsInCircle(int n)
n - the number of points