Exemplo n.º 1
0
 public Quadrilateral(double edgeBefore,  double edgeAfter) : this()  // Rectangel constructor 
 {
     anglePoints[0] = new AnglePoint(90, edgeBefore, edgeAfter);
     anglePoints[1] = new AnglePoint(90, edgeAfter, edgeBefore);
     anglePoints[2] = new AnglePoint(90, edgeBefore, edgeAfter);
     anglePoints[3] = new AnglePoint(90, edgeAfter, edgeBefore);
 }
Exemplo n.º 2
0
 public Quadrilateral(double edge):this() // Square constructor
 {
     anglePoints[0] = new AnglePoint(90, edge, edge);
     anglePoints[1] = new AnglePoint(90, edge, edge);
     anglePoints[2] = new AnglePoint(90, edge, edge);
     anglePoints[3] = new AnglePoint(90, edge, edge);
 }
Exemplo n.º 3
0
        public Rhombus(double angle, double edge)

        {
            anglePoints[0] = new AnglePoint(angle, edge, edge);
            anglePoints[1] = new AnglePoint((360 - 2 * angle) / 2, edge, edge);
            anglePoints[2] = new AnglePoint(angle, edge, edge);
            anglePoints[3] = new AnglePoint((360 - 2 * angle) / 2, edge, edge);
        }
Exemplo n.º 4
0
        protected Triangle(double angle, double edge) : this() // konstruktorius lygiasoniam
        {
            anglePoints[0] = new AnglePoint(angle, edge, edge);
            double A = (180 - angle) / 2;
            double B = A;
            double c = FormulaLibrary.OpositeEdge(anglePoints[0]);

            anglePoints[1] = new AnglePoint(A, edge, c);
            anglePoints[2] = new AnglePoint(B, c, edge);
        }
Exemplo n.º 5
0
        public Triangle(double angle, double edgeBefore, double edgeAfter) : this() // konstruktorius belekokiame trikampiui
        {
            anglePoints[0] = new AnglePoint(angle, edgeBefore, edgeAfter);
            double a = FormulaLibrary.OpositeEdge(anglePoints[0]);
            double B = FormulaLibrary.AngleBetween(angle, a, edgeBefore);
            double C = 180 - B - angle;

            anglePoints[1] = new AnglePoint(B, edgeAfter, a);
            anglePoints[2] = new AnglePoint(C, a, edgeBefore);
        }
Exemplo n.º 6
0
 public Quadrilateral(double angle, double edgeBefore, double edgeAfter,
     double angleInfront, double edgeBeforeInfront, double edgeAfterInfront) : this()
 {
     anglePoints[0] = new AnglePoint(angle, edgeBefore, edgeAfter);
     anglePoints[2] = new AnglePoint(angleInfront, edgeBeforeInfront, edgeAfterInfront);
     double hypotenuse = FormulaLibrary.OpositeEdge(anglePoints[0]);
     double secondAngle = FormulaLibrary.AngleBetween(angle, hypotenuse, edgeAfter) + FormulaLibrary.AngleBetween(angleInfront, hypotenuse, edgeAfterInfront);
     double lastAngle = 360 - angle - angleInfront - secondAngle;
     anglePoints[1] = new AnglePoint(secondAngle, edgeAfter, edgeBeforeInfront);
     anglePoints[3] = new AnglePoint(lastAngle, edgeAfterInfront, edgeBefore);
 }
Exemplo n.º 7
0
 //pagal kosinuso teorema
 public static double OpositeEdge(AnglePoint anglePoint)
 {
     return(Math.Sqrt(Math.Pow(anglePoint.EdgeBefore, 2) + Math.Pow(anglePoint.EdgeAfter, 2)
                      - 2 * anglePoint.EdgeBefore * anglePoint.EdgeAfter * Math.Cos(anglePoint.Angle * Math.PI / 180)));
 }
Exemplo n.º 8
0
 public Quadrilateral(double angle, double edgeBefore, double edgeAfter):this()//  Parallelogram constructor 
 {
     anglePoints[0]= anglePoints[2] = new AnglePoint(angle, edgeBefore, edgeAfter);
     anglePoints[1] = anglePoints[3] = new AnglePoint((360-2*angle)/2, edgeAfter, edgeBefore);
 }
Exemplo n.º 9
0
 protected Triangle(double edge) : this() // konstruktorius lygiakrasciam
 {
     anglePoints[0] = new AnglePoint(60, edge, edge);
     anglePoints[1] = new AnglePoint(60, edge, edge);
     anglePoints[2] = new AnglePoint(60, edge, edge);
 }