Пример #1
0
        public void Visualize(System.Windows.Forms.PictureBox pictureBox, Xi xi, Eta eta,
                              System.Windows.Forms.PaintEventArgs e, List <Tuple <float, float> > values)
        {
            System.Drawing.Pen pen = new System.Drawing.Pen(System.Drawing.Color.Red);

            Func f = _function.Func;

            foreach (Tuple <float, float> record in values)
            {
                float x = record.Item1, xnew = record.Item2;

                e.Graphics.DrawLine
                (
                    pen,
                    new System.Drawing.PointF(xi(x), eta(0)),
                    new System.Drawing.PointF(xi(x), eta(f(x)))
                );


                e.Graphics.DrawLine
                (
                    pen,
                    new System.Drawing.PointF(xi(x), eta(f(x))),
                    new System.Drawing.PointF(xi(xnew), eta(0))
                );
            }
        }
Пример #2
0
 public Graph(System.Windows.Forms.PictureBox pictureBox, Xi xi, Eta eta, Function function)
 {
     _pictureBox = pictureBox;
     _xi         = xi;
     _eta        = eta;
     _function   = function;
 }
 private void LimparGeral()
 {
     txtResposta.Clear();
     txtErro.Clear();
     Resposta.Clear();
     Xi.Clear();
     Yi.Clear();
     LimparX();
 }
Пример #4
0
        public List <double> CalcXi(double Xn)
        {
            Xi.Clear();
            var tmp = Xn;

            while (tmp < maxX + h)
            {
                Xi.Add(tmp);
                tmp += h;
            }
            return(Xi);
        }