Beispiel #1
0
        private static void DisturbPoints(RandomEngine random, double scale, IList <Point> points,
                                          IList <Vector> normals)
        {
            var count = points.Count;

            for (var i = 1; i < count; i++)
            {
                var num3    = random.NextGaussian(0.0, 1.0 * scale);
                var num4    = random.NextUniform(-0.5, 0.5) * scale;
                var point   = points[i];
                var vector  = normals[i];
                var vector2 = normals[i];
                var point2  = points[i];
                var vector3 = normals[i];
                var vector4 = normals[i];
                points[i] = new Point(point.X + vector.X * num4 - vector2.Y * num3,
                                      point2.Y + vector3.X * num3 + vector4.Y * num4);
            }
        }