public static ControlPointArray Generate(int count, float minX, float maxX, float minY, float maxY)
        {
            ControlPointArray p = new ControlPointArray(count);

            p.Generate(minX, maxX, minY, maxY);
            return(p);
        }
Exemple #2
0
        private void Reset()
        {
            _time   = 0.1f;
            _points = null;
            Random random = new Random();

            _baseHue = (float)random.NextDouble();
            Invalidate();
        }
        public ControlPointArray Reduce(float t)
        {
            ControlPointArray result = new ControlPointArray(Count - 1);
            int count = Count;

            for (var index = 0; index < count - 1; ++index)
            {
                var point1 = _points[index];
                var point2 = _points[index + 1];
                result[index] = new PointF(point1.X + (point2.X - point1.X) * t, point1.Y + (point2.Y - point1.Y) * t);
            }
            return(result);
        }