예제 #1
0
 public FractalViewer()
 {
     bitmap          = new Bitmap(ArgsAdapter.GetIntArgs(0), ArgsAdapter.GetIntArgs(1));
     newtonFactorial = new NewtonFractal();
     colors          = new Color[] {
         Color.Red, Color.Blue, Color.Green, Color.Yellow, Color.Orange,
         Color.Fuchsia, Color.Gold, Color.Cyan, Color.Magenta
     };
 }
예제 #2
0
 public NewtonFractal()
 {
     roots                = new List <ComplexNumber>();
     xmin                 = ArgsAdapter.GetDoubleArgs(0);
     xmax                 = ArgsAdapter.GetDoubleArgs(1);
     ymin                 = ArgsAdapter.GetDoubleArgs(2);
     ymax                 = ArgsAdapter.GetDoubleArgs(3);
     xstep                = (xmax - xmin) / ArgsAdapter.GetIntArgs(0);
     ystep                = (ymax - ymin) / ArgsAdapter.GetIntArgs(1);
     polynomial           = getPolynomial();
     derivativePolynomial = polynomial.Derive();
 }