public override List <PointDO> Values(ViewReckoner vr)
        {
            List <PointDO> values = new List <PointDO>();

            foreach (Line l in _lines)
            {
                List <PointDO> vs = l.Values(vr);
                values.AddRange(vs);
                values.Add(new PointDO()); // discontinuity
            }
            return(values);
        }
        public override List <PointDO> Values(ViewReckoner vr)
        {
            const int      n      = 100;
            List <PointDO> values = new List <PointDO>();

            double arg = 0;

            for (int i = 0; i <= n; i++)
            {
                PointD p = new PointD(
                    (double)_c0.X + ((double)_r) * Math.Cos(arg),
                    (double)_c0.Y + ((double)_r) * Math.Sin(arg));
                values.Add(new PointDO(vr.CToV(p)));
                arg += (2.0 * Math.PI) / (double)n;
            }
            return(values);
        }
        public override List <PointDO> Values(ViewReckoner vr)
        {
            const int n = 50;

            List <PointDO> values = new List <PointDO>();

            double x0 = vr.XCToV(_p0.X);
            double x1 = vr.XCToV(_p1.X);
            double y0 = vr.YCToV(_p0.Y);
            double y1 = vr.YCToV(_p1.Y);

            double xd = (x1 - x0) / (double)n;
            double yd = (y1 - y0) / (double)n;

            for (int i = 0; i <= n; ++i)
            {
                values.Add(new PointDO(x0 + (double)i * xd, y0 + (double)i * yd, _color));
            }

            return(values);
        }
        public Plotter2d(PictureBox plot, double xExtent, double yExtent, IPlotter plotter)
        {
            double xmin = -xExtent / 2.0;
            double xmax = xExtent / 2.0;
            double ymin = -yExtent / 2.0;
            double ymax = yExtent / 2.0;

            _plot    = plot;
            _plotter = plotter;
            _origin  = new PointD(0.0, 0.0);
            _vr      = new ViewReckoner(
                _border, plot.Width - _border, plot.Height - _border, _border,
                xmin, xmax, ymin, ymax);
            _plot.BackColor = Color.White;
            _plot.Paint    += new PaintEventHandler(OnPaint);

            // create the axis
            _axes       = new Axes();
            _axes.XAxis = new Axis(xmin, xmax, _origin.X, _noOfTicks);
            _axes.YAxis = new Axis(ymin, ymax, _origin.Y, _noOfTicks);

            // rubber band
            _plot.MouseDown += new MouseEventHandler(OnMouseDown);
            _plot.MouseUp   += new MouseEventHandler(OnMouseUp);
            _plot.MouseMove += new MouseEventHandler(OnMouseMove);

            // create image planes
            _mainImage   = new ImagePlane(_plot);
            _bandImage   = new ImagePlane(_plot);
            _mapperImage = new ImagePlane(_plot);

            Point oc = _vr.VToC(_origin);

            //_mapper = new Grid(oc.X, oc.X + _vr.CXSize / 4, 4, oc.Y, oc.Y - _vr.CYSize / 4, 4);
            //_mapper = new Line(oc, new Point(oc.X + _vr.CXSize / 4, oc.Y - _vr.CYSize / 4));

            Replot();
        }
 public PlotterGraphics(ViewReckoner vr, Graphics g)
 {
     _vr       = vr;
     _graphics = g;
 }
 public abstract List <PointDO> Values(ViewReckoner vr);