예제 #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;
        }
예제 #2
0
 private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
 {
     _fractal = FractalFactory.GetConstructiveFractal(comboBox2.SelectedIndex);
     Render();
 }