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