示例#1
0
        public static void TimeSubdivision(ICurve2 curve, int size, IList <Point2d> points)
        {
            Debug.Assert(size >= 2);
            Debug.Assert(points != null);

            double delta = (curve.TMax - curve.TMin) / (size - 1);
            double t     = curve.TMin;

            for (int i = 0; i < size; i++)
            {
                points.Add(curve.GetPosition(t));
                t += delta;
            }
        }
示例#2
0
        public static void LengthSubdivision(ICurve2 curve, int size, IList <Point2d> puntos)
        {
            Debug.Assert(size >= 2);
            Debug.Assert(puntos != null);

            double delta    = curve.TotalLength / (size - 1);
            double longitud = 0;

            for (int i = 0; i < size; i++)
            {
                double t = curve.GetT(longitud);
                puntos.Add(curve.GetPosition(t));
                longitud += delta;
            }
        }