Class Triangle2d


  • public class Triangle2d
    extends Object
    • Constructor Detail

      • Triangle2d

        public Triangle2d()
    • 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)
      • leftMostFirst

        public static Coord3d[] leftMostFirst​(Coord3d[] segment)
      • 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)