Example #1
0
        private Bitmap GetInitialZone()
        {
            _currentRadius = _size / 2 * CONTRACT_RATIO;
            _currentCenter = GetInitialRandomCenter();
            var bitmapWithCirlce = ShapeHelper.AddCircle(new Bitmap(_fortniteMap), Brushes.WhiteSmoke, _currentCenter, (float)_currentRadius);

            return(ShapeHelper.CropToCircle(bitmapWithCirlce, Color.MediumOrchid, _currentCenter, _currentRadius));
        }
Example #2
0
        public Bitmap GetNextZoneSet()
        {
            _nextCenter = GetRandCircle(_currentCenter, _currentRadius * (1 - CONTRACT_RATIO));
            _nextRadius = _currentRadius * CONTRACT_RATIO;

            var bitmapWithCirlce   = ShapeHelper.AddCircle(new Bitmap(_fortniteMap), Brushes.Blue, _currentCenter, (float)_currentRadius);
            var bitmapCropToCircle = ShapeHelper.CropToCircle(bitmapWithCirlce, Color.MediumOrchid, _currentCenter, _currentRadius);

            _currentZoneSet = ShapeHelper.AddCircle(new Bitmap(_fortniteMap), Brushes.WhiteSmoke, _nextCenter, (float)_nextRadius);

            return(ShapeHelper.AddCircle(new Bitmap(bitmapCropToCircle), Brushes.WhiteSmoke, _nextCenter, (float)_nextRadius));;
        }
Example #3
0
        public Bitmap DoContractSteps(int stepCount, int step)
        {
            // Abbildung von current -> next
            var stepRadius       = _nextRadius + (stepCount - step) / (double)stepCount * (_currentRadius - _nextRadius);
            var stepCenter       = _nextCenter + (stepCount - step) / (double)stepCount * (_currentCenter - _nextCenter);
            var bitmapWithCirlce = ShapeHelper.AddCircle(new Bitmap(_currentZoneSet), Brushes.Blue, stepCenter, (float)stepRadius);

            if (step == stepCount)
            {
                _currentRadius = stepRadius;
                _currentCenter = stepCenter;
            }

            return(ShapeHelper.CropToCircle(bitmapWithCirlce, Color.MediumOrchid, stepCenter, stepRadius));
        }