Ejemplo n.º 1
0
        public double getSumOfAngles(Point point)
        {
            Vector vecRight = new Vector(start, point);
            Vector vecLeft = new Vector(end, point);

            double angleRight = 180 * (Math.Acos(getDotMultiplication(vecRight) / (length * vecRight.Length))) / Math.PI;
            double angleLeft = 180 * (Math.Acos((new Vector(end, start).getDotMultiplication(vecLeft)) / (length * vecLeft.Length))) / Math.PI;
            return angleLeft + angleRight;
        }
Ejemplo n.º 2
0
 public double getVectorMultiplication(Vector vector)
 {
     return dx * vector.dy - dy * vector.dx;
 }
Ejemplo n.º 3
0
 public Vector getSum(Vector vector)
 {
     return new Vector(start, new Point(start.X + dx + vector.dx, start.Y + dy + vector.dy));
 }
Ejemplo n.º 4
0
 public double getDotMultiplication(Vector vector)
 {
     return dx * vector.dx + dy * vector.dy;
 }
Ejemplo n.º 5
0
 public static Section getFRhom(List<Section> sections, Vector vec)
 {
     foreach (Section section in sections)
     {
         if (section.Equals(vec))
             return section;
     }
     return null;
 }
Ejemplo n.º 6
0
 public Section(Vector vector, Triangle left, Triangle right)
 {
     this.Vector = vector;
     this.left = left;
     this.right = right;
 }
Ejemplo n.º 7
0
 public Section(Vector vector)
 {
     this.Vector = vector;
     left = null;
     right = null;
 }