Пример #1
0
        private void ResetButton_Click(object sender, EventArgs e)
        {
            BoidCalculations.Reset(AreaWidth / 2, AreaHeight / 2);

            for (int x = 1; x < RenderArea.Width; x++)
            {
                for (int y = 1; y < RenderArea.Height; y++)
                {
                    image.SetPixel(x, y, Color.Black);
                }
            }
        }
Пример #2
0
        public Form1()
        {
            InitializeComponent();

            AreaWidth  = RenderArea.Width;
            AreaHeight = RenderArea.Height;

            image            = new Bitmap(AreaWidth, AreaHeight, PixelFormat.Format32bppRgb);
            RenderArea.Image = image;

            BoidCalculations.Reset(AreaWidth / 2, AreaHeight / 2);
        }