修改 mandelbrot 图像应用程序 ,要求输入边界,显示选中图像部分?
我是刚入门的,这个怎么修改呀?米有头绪。帮帮忙了~~~using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
double realCoord, imagCoord;
double realTemp, imagTemp, realTemp2, arg;
int iterations;
for (imagCoord = 1.2; imagCoord >= -1.2; imagCoord -= 0.05)
{
for (realCoord = -0.6; realCoord <= 1.77; realCoord += 0.03)
{
iterations = 0;
realTemp = realCoord;
imagTemp = imagCoord;
arg = ( imagCoord * imagCoord ) + ( realCoord * realCoord );
while ((arg < 4) && (iterations < 40))
{
realTemp2 = ( realTemp * realTemp ) - ( imagTemp * imagTemp ) - realCoord;
imagTemp = (2 * realTemp * imagTemp ) - imagCoord;
realTemp = realTemp2;
arg = (realTemp * realTemp) + (imagTemp * imagTemp);
iterations += 1;
}
switch (iterations % 4)
{
case 0:
Console.Write("*");
break;
case 1:
Console.Write("&");
break;
case 2:
Console.Write("^");
break;
case 3:
Console.Write("@");
break;
}
}
Console.Write("\n");
}
Console.ReadKey();
}
}
}
怎么修改啊?