Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="field"></param>
        /// <param name="points"></param>
        /// <param name="stepSize"></param>
        /// <param name="stepCount"></param>
        /// <param name="mode"></param>
        private PolylineCurve[] SolveInstanceImpl(IField3d <Vec3d> field, List <Point3d> points, double stepSize, int stepCount)
        {
            var result = new PolylineCurve[points.Count];

            Parallel.For(0, points.Count, i =>
            {
                var pts   = field.IntegrateFrom(points[i], stepSize, _mode).Take(stepCount).Select(p => (Point3d)p);
                result[i] = new PolylineCurve(pts);
            });

            return(result);
        }