Package org.jzy3d.maths
Class Triangle2d
- java.lang.Object
-
- org.jzy3d.maths.Triangle2d
-
public class Triangle2d extends Object
-
-
Constructor Summary
Constructors Constructor Description Triangle2d()
Triangle2d(Coord2d a, Coord2d b, Coord2d c)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Triangle2d
equilateral(float side)
Creates the following 2D equilateral triangle with A at (0,0) and C at (side,0).protected static double
equilateralHeight(double side)
Coord2d
getCenter()
Coord2d
getCenterAB()
Coord2d
getCenterAC()
Coord2d
getCenterBC()
Coord2d
getMedianAB()
Coord2d
getMedianAC()
Coord2d
getMedianBC()
Coord2d
getMedianCA()
Coord3d[]
getSegmentAB(float z)
Coord3d[]
getSegmentAC(float z)
Coord3d[]
getSegmentBA(float z)
Coord3d[]
getSegmentBC(float z)
static Coord3d[]
leftMostFirst(Coord3d[] segment)
static Coord3d[]
leftMostFirst(Coord3d seg0, Coord3d seg1)
Triangle2d
mul(float value)
Triangle2d
mulSelf(float value)
static Coord3d[]
segment(Coord3d c1, Coord3d c2)
-
-
-
Method Detail
-
getMedianAB
public Coord2d getMedianAB()
-
getMedianAC
public Coord2d getMedianAC()
-
getMedianBC
public Coord2d getMedianBC()
-
getMedianCA
public Coord2d getMedianCA()
-
getSegmentAB
public Coord3d[] getSegmentAB(float z)
-
getSegmentBA
public Coord3d[] getSegmentBA(float z)
-
getSegmentAC
public Coord3d[] getSegmentAC(float z)
-
getSegmentBC
public Coord3d[] getSegmentBC(float z)
-
mul
public Triangle2d mul(float value)
-
mulSelf
public Triangle2d mulSelf(float value)
-
getCenter
public Coord2d getCenter()
- Returns:
- the 2D center of this triangle
- See Also:
3 of https://fr.wikihow.com/calculer-le-centre-de-gravit%C3%A9-d%27un-triangle
-
getCenterAB
public Coord2d getCenterAB()
- Returns:
- the 2D center of this triangle
- See Also:
2 of https://fr.wikihow.com/calculer-le-centre-de-gravit%C3%A9-d%27un-triangle
-
getCenterAC
public Coord2d getCenterAC()
- Returns:
- the 2D center of this triangle
- See Also:
2 of https://fr.wikihow.com/calculer-le-centre-de-gravit%C3%A9-d%27un-triangle
-
getCenterBC
public Coord2d getCenterBC()
- Returns:
- the 2D center of this triangle
- See Also:
2 of https://fr.wikihow.com/calculer-le-centre-de-gravit%C3%A9-d%27un-triangle
-
equilateral
public static Triangle2d equilateral(float side)
Creates the following 2D equilateral triangle with A at (0,0) and C at (side,0). B yields to (side / 2, side * Math.sqrt(3) / 2)B /\ / \ / \ / \ / \ ---------- A C
- Parameters:
side
-
-
equilateralHeight
protected static double equilateralHeight(double side)
-
-