Package org.jzy3d.maths
Class Angle3d
- java.lang.Object
-
- org.jzy3d.maths.Angle3d
-
public class Angle3d extends Object
An Angle3d stores three 3d points, considering the angle is on the second one. An instance may return angle(), cos() and sin().
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEGREE_45
static double
DEGREE_45_D
static float
DEGREE_90
static double
DEGREE_90_D
protected float
x1
protected float
x2
protected float
x3
protected float
y1
protected float
y2
protected float
y3
protected float
z1
protected float
z2
protected float
z3
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
angle()
Computes the angle at vertex p2 between rays p1,p2 and p3,p2.double
angleD()
Computes the angle at vertex p2 between rays p1,p2 and p3,p2.static double
angleSum(List<Coord3d> coords)
Compute the sum of all angles in the input coordinate list.static double
angleSumFromPoints(List<Point> coords)
static boolean
angleSumFromPointsOfNonIntersectingPolygon(List<Point> coords)
static double
angleSumOfNonIntersectingPolygon(int n)
Returns the expected sum of all angles of a polygon given its number of points.static double
angleSumOfNonIntersectingPolygonRad(int n)
float
cos()
Computes cosinus of the anglefloat
sin()
Computes the sinus of the angle, by creating a fourth point on an orthogonal direction.
-
-
-
Field Detail
-
DEGREE_90_D
public static final double DEGREE_90_D
- See Also:
- Constant Field Values
-
DEGREE_90
public static final float DEGREE_90
- See Also:
- Constant Field Values
-
DEGREE_45_D
public static final double DEGREE_45_D
- See Also:
- Constant Field Values
-
DEGREE_45
public static final float DEGREE_45
- See Also:
- Constant Field Values
-
x1
protected float x1
-
x2
protected float x2
-
x3
protected float x3
-
y1
protected float y1
-
y2
protected float y2
-
y3
protected float y3
-
z1
protected float z1
-
z2
protected float z2
-
z3
protected float z3
-
-
Method Detail
-
sin
public float sin()
Computes the sinus of the angle, by creating a fourth point on an orthogonal direction.
-
cos
public float cos()
Computes cosinus of the angle
-
angle
public float angle()
Computes the angle at vertex p2 between rays p1,p2 and p3,p2. Returns 0 to PI radians.
-
angleD
public double angleD()
Computes the angle at vertex p2 between rays p1,p2 and p3,p2. Returns 0 to PI radians.
-
angleSum
public static double angleSum(List<Coord3d> coords)
Compute the sum of all angles in the input coordinate list. If input contains point A, B, C, this method will compute angles ABC, BCA, CAB. An error is thrown if there are less than 3 points.
-
angleSumOfNonIntersectingPolygon
public static double angleSumOfNonIntersectingPolygon(int n)
Returns the expected sum of all angles of a polygon given its number of points. The polygon is supposed to not have any edge crossing another edge.- Parameters:
n
-- Returns:
-
angleSumOfNonIntersectingPolygonRad
public static double angleSumOfNonIntersectingPolygonRad(int n)
-
-