Exemple #1
0
 public MathVector[] Get_vector_field()
 {
     MathVector[] vectors = new MathVector[]
     {
         new MathVector()
         {
             Beginning = new MathPoint(1,1),
             End = new MathPoint(1.4, 1.4)
         }
     };
     return vectors;
 }
Exemple #2
0
        public MathVector[] Get_vector_field()
        {
            MathVector[] lines = new MathVector[grid.Length];
            for (int i = 0; i < Math.Sqrt(grid.Length); ++i)
                for (int j = 0; j < Math.Sqrt(grid.Length); ++j)
                {
                    double[] v = new double[2];
                    v = model.calculateV(grid[i, j].X, grid[i, j].Y);

                    MathVector vec = new MathVector()
                    {
                        Beginning = new MathPoint(grid[i, j].X, grid[i, j].Y),
                        End = new MathPoint(grid[i, j].X + v[0], grid[i, j].Y + v[1])
                    };
                    lines[i * (int)Math.Sqrt(grid.Length) + j] = vec;
                }
            model.calculateGamaJ();
            model.calculateGamaForLv();
            model.calculateCoordinatesForLv();
            model.calculateCoordinatesForOilSlick();
            return lines;
        }