Esempio n. 1
0
        private FourPoint ComputeLeftCheek(PointF[] points)
        {
            PointF a = points[2];
            PointF b = points[3];
            PointF c = points[30];
            PointF d = points[29];

            PointF c1, m1, n1, c2, m2, n2;

            GetCharaks(a, d, out c1, out m1, out n1);
            GetCharaks(b, c, out c2, out m2, out n2);
            FourPoint fourPoint = new FourPoint();

            fourPoint.M1 = new Point((int)m1.X, (int)m1.Y);
            fourPoint.N1 = new Point((int)n1.X, (int)n1.Y);
            fourPoint.M2 = new Point((int)m2.X, (int)m2.Y);
            fourPoint.N2 = new Point((int)n2.X, (int)n2.Y);
            return(fourPoint);
        }
Esempio n. 2
0
        private FourPoint ComputeChainArea(PointF[] points)
        {
            PointF a = points[56];
            PointF b = points[5];
            PointF c = points[9];

            int m1x = (int)(a.X * .1 + b.X * .9);
            int m1y = (int)(a.Y * .1 + b.Y * .9);
            int n1x = (int)(a.X * .1 + c.X * .9);
            int n1y = (int)(a.Y * .1 + c.Y * .9);
            int m2x = (int)(a.X * .9 + b.X * .1);
            int m2y = (int)(a.Y * .9 + b.Y * .1);
            int n2x = (int)(a.X * .9 + c.X * .1);
            int n2y = (int)(a.Y * .9 + c.Y * .1);

            FourPoint fourPoint = new FourPoint();

            fourPoint.M1 = new Point(m1x, m1y);
            fourPoint.N1 = new Point(n1x, n1y);
            fourPoint.M2 = new Point(m2x, m2y);
            fourPoint.N2 = new Point(n2x, n2y);
            return(fourPoint);
        }