Beispiel #1
0
        private void diamond_Click(object sender, EventArgs e)
        {
            DiamondSquare ds = new DiamondSquare(
                (int)num_iter_fract.Value,
                0,
                512f,
                (float)shoroh.Value
                );

            ds.Iterate();
            Graphics graphics;

            graphics = Graphics.FromImage(pictureBox.Image);
            graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            graphics.Clear(pictureBox.BackColor);

            ds.Draw(graphics);
            pictureBox.Refresh();
        }