Esempio n. 1
0
        ///////////////////////////ADDED FUNCTIONS/////////////////////////


        private void Calculate()
        {
            int step = 1;

            double th = entity.GetTH();
            double t0 = entity.GetT0();
            double tk = entity.GetTK();
            double r0 = entity.GetR();
            double h  = entity.GetH();
            double b  = entity.GetB();
            double l  = entity.GetL();
            double E  = entity.GetE();
            double P  = entity.GetP();

            while (t0 <= tk)
            {
                double resultY = mathLogic.CountY(r0, b, h, l, E, t0, P);

                dataGridView1.Rows.Add(step, t0, resultY);
                chart1.Series[0].Points.AddXY(t0, resultY);

                entity.AddT(t0);
                entity.AddY(resultY);

                t0 += th;
                t0  = Math.Round(t0, 3);
                step++;

                System.Threading.Thread.Sleep(1);
                Application.DoEvents();
            }
        }
Esempio n. 2
0
        private String CreateInfo(EntityCords entity)
        {
            String info = " R0 = " + entity.GetR() + "\n P = " + entity.GetP() + "\n b = " + entity.GetB() + "\n h = " + entity.GetH() +
                          "\n l = " + entity.GetL() + "\n E = " + entity.GetE() + "\n t0 = " + entity.GetT0() + "\n th = " + entity.GetTH() + "\n tk = " +
                          entity.GetTK();

            return(info);
        }