Пример #1
0
        public SeligCoordinate Lednicer2Selig()
        {
            var    result = new SeligCoordinate();
            int    state  = 0;
            double tx     = Points[0].x;

            result.Points.Add(Points[0]);
            for (int i = 1; i < Points.Count; i++)
            {
                //state切り替え
                if (state == 0 && tx > Points[i].x)
                {
                    state = 1;
                }

                //点の補充
                if (state == 0)
                {
                    result.Points.Insert(0, Points[i]);
                }
                if (state == 1)
                {
                    result.Points.Add(Points[i]);
                }
                tx = Points[i].x;
            }
            return(result);
        }
Пример #2
0
        public static IAirfoilCoordinate Lerp(IAirfoilCoordinate A, IAirfoilCoordinate B, double rate)
        {
            if (A.N != B.N)
            {
                B.N = A.N;
            }
            var result = new SeligCoordinate();


            for (int i = 0; i < A.N; i++)
            {
                result.Points.Add(new Pos(A.NormalPoints[i].x, Cal.Lerp(A.NormalPoints[i].y, B.NormalPoints[i].y, rate)));
            }

            return((IAirfoilCoordinate)result);
        }