示例#1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            pictureBox1.BackColor = Color.White;
            _bitmap  = CreateBackground(pictureBox1.Width, pictureBox1.Height);
            _fractal = FractalFactory.GetConstructiveFractal(0);

            const int cMaxIteration = 5;

            for (int i = 1; i <= cMaxIteration; i++)
            {
                comboBox1.Items.Add(i);
            }

            comboBox1.SelectedIndex = 0;

            // типы фракталов
            comboBox2.Items.Add("Кривая Коха");
            comboBox2.Items.Add("Минковский");
            comboBox2.Items.Add("Дракон");
            comboBox2.Items.Add("Лед");
            comboBox2.SelectedIndex = 0;
        }
 private void Form1_Load(object sender, EventArgs e)
 {
     _bitmap  = CreateBackground(pictureBox1.Width, pictureBox1.Height);
     _fractal = new KochDirectFractal();
 }
示例#3
0
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     _fractal = FractalFactory.GetConstructiveFractal(comboBox2.SelectedIndex);
     Render();
 }