private void StartVisualization(object args) { Generator.FractalScale = ScaleConverter.remapScale(-_fractalScale); Generator.Power = _fractalPower; Generator.Constant = new Complex(_constantReal, _constantImaginary); Generator.currentColorModel = NewtonFractalGenerator.colorModels[_currentColorModel]; startGeneration(); }
public FractalsDataViewModel(int width, int height) : this() { _generatingProgress = 0.0; _progressVisibility = Visibility.Collapsed; _constantReal = -1.0; _constantImaginary = 0.0; _currentColorModel = 0; _fractalScale = 0.0; _fractalPower = 3.0; setProgressAction = (p => GeneratingProgress = p); Generator = new NewtonFractalGenerator(_fractalPower, new Complex(_constantReal, _constantImaginary), NewtonFractalGenerator.colorModels[_currentColorModel]) { Width = width, Height = height, FractalScale = ScaleConverter.remapScale(-_fractalScale) }; Generator.generate(null, setProgressAction); _image = Generator.Image; }