Ejemplo n.º 1
0
        public static DataSource CreatePotentialField(int width, int height, params PotentialPoint[] points)
        {
            var potentialField = new PotentialField();

            potentialField.AddPoints(points);
            var vectorArray = DataSource2DHelper.CreateVectorData(width, height, (x, y) =>
            {
                return(potentialField.GetPotential(new Point(x, y)));
            });

            return(CreateVectorField(width, height, vectorArray));
        }
Ejemplo n.º 2
0
		public static DataSource CreatePotentialField(int width, int height, params PotentialPoint[] points)
		{
			var potentialField = new PotentialField();
			potentialField.AddPoints(points);
			var vectorArray = DataSource2DHelper.CreateVectorData(width, height, (x, y) =>
			{
				return potentialField.GetPotential(new Point(x, y));
			});

			return CreateVectorField(width, height, vectorArray);
		}