public override void Render(PixelBuffer buffer, MandelbrotSet set, BandMap bandMap, int maxCount) { this.InitializeCoordinateMap(buffer.SizeX, buffer.SizeY, set); DoubleComplexNumber temp = new DoubleComplexNumber(0.0, 0.0); for (int i = 0; i < buffer.SizeX; i++) { temp.X = this.XCoordinates[i]; for (int j = 0; j < buffer.SizeY; j++) { temp.Y = this.YCoordinates[j]; int count = temp.CalculateCount(maxCount); this.SetBand(buffer, bandMap, i, j, count); } } }
public MandelbrotSet(DoubleComplexNumber center, double side) { this.Center = center; this.Side = side; }
private void FillToOtherSideOfBand(int x,int y,int inc, int band) { int temp; int test = GetBand(x + inc, y); if ((test == 0) || (test == band)) { temp = x+inc; test = GetBand(temp, y); while((test == 0)) { if (temp >= this.sizex) break; if (temp < 0) break; if (test == 0) { this.buffer.SetValue(temp, y, band); } temp += inc; test = GetBand(temp, y); } } }
public void Add(DoubleComplexNumber other) { this.X += other.X; this.Y += other.Y; }
public DoubleComplexNumber(DoubleComplexNumber other) { this.X = other.X; this.Y = other.Y; }