예제 #1
0
        private void _initialize()
        {
            traceList.Clear();
            Random rand = new Random();

            float xpos = -50;

            int ntrace = Width / 100;

            for (int i = 0; ; i++)
            {
                xpos += AnimatorRandom.RandF(50f, 100f);
                Color color = Color.FromArgb(rand.Next(100), Color.White);
                var   aT    = new AnimatorTrace(color,
                                                (float)rand.Next(1, 10),
                                                xpos,
                                                (float)Math.Pow(10, AnimatorRandom.RandF(1, 1.8f)),
                                                (float)AnimatorRandom.RandF(-1.3f, 1.3f));
                aT.Bounds = doubleBuffer1.Bounds;
                aT.Initialize();
                traceList.Add(aT);
                if (xpos > Width)
                {
                    break;
                }
            }
        }
예제 #2
0
        internal void Initialize()
        {
            _bigBufferAmt = _nEdge * _dY;
            _arrayLen     = (int)(Bounds.Height / _dY);
            _arrayLen    += _nEdge;
            _arrayLen    += _nEdge;

            _components = new List <PointF>();
            for (int j = 0; j < _nComponents; j++)
            {
                _components.Add(new PointF(AnimatorRandom.RandF(0, 3.14f), AnimatorRandom.RandF(1, 50)));
            }

            List <PointF> points = new List <PointF>();

            for (int i = 0; i < _arrayLen; i++)
            {
                float rv = _calcValue(i);
                points.Add(new PointF(rv, i * _dY));
            }

            ptArr = points.ToArray();
        }