public class Point extends Point implements Simplex
Constructor and Description |
---|
Point(double[] coords)
Construct a point with the specified coordinates.
|
Point(double x,
double y,
double z)
Construct a point with the specified coordinates.
|
Point(Point p)
Construct a point that is a clone of p.
|
Point(Vector v)
Construct a point at the coordinates of v.
|
Modifier and Type | Method and Description |
---|---|
Point |
add(double x,
double y,
double z)
Returns a point translated from this one by (x,y,z)
|
Point |
add(Point p) |
Point |
add(Vector p)
Returns a point translated from this one by p (without changing this object).
|
Point |
addThis(Point p) |
Point |
addThis(Vector p)
Returns p added to this (changing this object).
|
Point |
clone()
Return a new object that equals this object.
|
static boolean |
collinear(Point p0,
Point p1,
Point p2)
Returns true if three points are on the same line.
|
static boolean |
coplanar(Point p0,
Point p1,
Point p2,
Point p3)
Returns true if four specified points are in the same plane
|
double |
distance(Point q)
Get the distance from this point to point q
|
double |
distanceSquared(Point q)
Get the squared distance from this point to point q.
|
boolean |
dominates(Point q)
Returns true if this point dominates point q.
|
boolean |
dominates(Point q,
int i,
int j,
int k)
Returns true if this point dominates point q (i=0,1,2 is the most important coordinate,
j=0,1,2 is the second most important coordinate and k=0,1,2 is the least important coordinate).
|
double |
dot(Point p) |
double |
dot(Vector v) |
boolean |
equals(java.lang.Object o)
Returns true iff o is a point that equals this point.
|
boolean |
equals(Point p)
Returns true iff this point and point p are overlapping.
|
static double |
getAngle(Point p1,
Point p2,
Point p3)
Get the angle between the line segments p2->p1 and p2->p3.
|
static Plane |
getBisector(Point p,
Point q)
Creates a bisector between points p and q
|
Point |
getCenter()
Returns a clone of this point.
|
static Point |
getCircumCenter(Point a,
Point b,
Point c) |
static double |
getCosDihedralAngle(Point p1,
Point p2,
Point p3,
Point p4) |
static double |
getDihedralAngle(Point p1,
Point p2,
Point p3,
Point p4)
Get the dihedral angle defined by the 4 non-collinear points p1, p2, p3, p4.
|
int |
getDimension()
Return the 'dimension' of this object.
|
static Circle |
getEquilateralCircle(Point a,
Point b,
Point c) |
static Point |
getEquilateralPoint(Point a,
Point b,
Point c) |
static Circle |
getEquilateralPoints(Point a,
Point b) |
static Point |
getMidpoint(Point p,
Point q)
Creates the midpoint of two points.
|
Point |
getPoint(int i)
TODO: Comment
|
static Point |
getSteinerPoint(Point a,
Point b,
Point c) |
static double |
inSphere(Point p,
Point q,
Point r,
Point s,
Point t)
Returns a positive double if point t is inside the sphere through points p, q, r, s.
|
static double |
orientation(Point p,
Point q,
Point r,
Point s) |
static double |
orientation(Point p,
Point q,
Point r,
Point s,
Point t) |
double |
polarAngleCosZ()
Returns the cosinus of the polar angle of this point with the z-axis
|
double |
polarAngleSinZ()
Returns the sinus of the polar angle of this point with the z-axis
|
Point |
reflectThroughOrigoThis()
Reflects this point through origo.
|
void |
rotation(Vector v,
double alpha,
Point p)
rotates (clockwise) the point around the line through the point p with the direction unit vector v.
|
void |
rotationCCW(Vector v,
double alpha) |
void |
rotationCW(Vector v,
double alpha)
rotates (clockwise) the point around the line through the origo with the direction unit vector v.
|
void |
scaleThis(double s)
Scale this point by a factor s
|
void |
setX(double x)
Set the first coordinate
|
void |
setY(double y)
Set the second coordinate
|
void |
setZ(double z)
Set the third coordinate
|
Point |
subtract(Point p) |
Point |
subtract(Vector p)
Returns p subtracted from this (without changing this object).
|
Point |
subtractThis(Point p) |
Point |
subtractThis(Vector p)
Returns p subtracted from this (changing this object).
|
static void |
swap(Point a,
Point b)
Swaps points a and b
|
void |
toConsole()
Writes this point to
System.out . |
void |
toConsole(int dec)
Writes this point to
System.out with dec decimals precision. |
java.lang.String |
toString()
Returns a string-representation of this point formatted with two decimals precision.
|
java.lang.String |
toString(int dec)
Returns a string-representation of this point formatted with
dec decimals precision. |
Vector |
toVector()
Returns the vector from origo to this point.
|
void |
translateThis(double dx,
double dy,
double dz)
Translates this point by (x,y,z).
|
void |
translateThis(Point p)
Translates this point by p.
|
Vector |
vectorTo(Point p)
Get the vector that points from this point to p
|
double |
x()
Get the first coordinate.
|
double |
y()
Get the second coordinate.
|
double |
z()
Get the third coordinate.
|
add, addThis, distance, distance, distanceSquared, distanceSquared, distanceSquaredXY, distanceXY, dot, fill, get, getCoord, getCoords, getDimensions, getRandomPoint, multiplyThis, polarAngleCosXY, polarAngleSinXY, polarAngleXY, set, set, setCoord, setCoord, vectorTo
public Point(double x, double y, double z)
public Point(double[] coords)
public Point(Point p)
public Point(Vector v)
public final double x()
public final double y()
public final double z()
public final void setX(double x)
public final void setY(double y)
public final void setZ(double z)
public final int getDimension()
getDimension
in interface Simplex
public static boolean collinear(Point p0, Point p1, Point p2)
public static boolean coplanar(Point p0, Point p1, Point p2, Point p3)
public static double inSphere(Point p, Point q, Point r, Point s, Point t)
public void translateThis(double dx, double dy, double dz)
public void translateThis(Point p)
public void scaleThis(double s)
public Point add(Vector p)
public Point add(double x, double y, double z)
public Point subtractThis(Vector p)
public Point subtract(Vector p)
public Point reflectThroughOrigoThis()
public void rotationCW(Vector v, double alpha)
public void rotationCCW(Vector v, double alpha)
public void rotation(Vector v, double alpha, Point p)
public double polarAngleSinZ()
public double polarAngleCosZ()
public double distanceSquared(Point q)
public double distance(Point q)
public double dot(Point p)
public double dot(Vector v)
public static Plane getBisector(Point p, Point q)
public static double getAngle(Point p1, Point p2, Point p3)
public static double getDihedralAngle(Point p1, Point p2, Point p3, Point p4)
public static double getCosDihedralAngle(Point p1, Point p2, Point p3, Point p4)
public boolean dominates(Point q)
public boolean dominates(Point q, int i, int j, int k)
public Point getCenter()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Point p)
public Point clone()
public Vector toVector()
public java.lang.String toString()
public java.lang.String toString(int dec)
dec
decimals precision.public void toConsole()
System.out
.