So, I am creating a map generator that creates random islands. It uses the Perlin Noise at the base of the generator, and then the method using circles with gradients to create islands.
The circle method creates several circles in the center of the map with a gradient from a color starting from 64 to 0. The problem is that this method creates a non-natural look at parts of the map with circular edges. When perlin noise is generated for a pixel, it will receive that pixel on the gradient map, and then gradually increase it to a blue value.
So, if the perlin noise gives one per pixel 1, 5, and the blue value on the gradient map is 54, it will give a noise value of 54. If the perlin noise on pixel 130, 560 is 0.5, and the color of the gradient is 64, then the value noise 32.
Here is what I get:

There are two key points to the code: the perlin bit:
noise = NoiseGenerator.Noise(x, y); double gradColour = getGradColour(x, y).B; double addedNoise = noise * gradColour; double gradNoise = addedNoise;
And then the gradient map generator:
public static void DrawGrad(float X, float Y, float R, Color C1, Color C2) { Graphics g = Graphics.FromImage(imgGrad); GraphicsPath path = new GraphicsPath(); path.AddEllipse(X, Y, R, R); PathGradientBrush pathGrBrush = new PathGradientBrush(path); pathGrBrush.CenterColor = C1; Color[] colours = { C2 }; pathGrBrush.SurroundColors = colours; g.FillEllipse(pathGrBrush, X, Y, R, R); //g.FillEllipse(Brushes.Red, X, Y, R, R); g.Flush(); } int amount = rnd.Next(25, 30); for (int i = 0; i < amount / 4; i++) { float X = rnd.Next(-800, 1748); float Y = rnd.Next(-800, 1748); float R = rnd.Next(1000, 1200); DrawGrad(X, Y, R, Color.FromArgb(255, 0, 0, rnd.Next(15, 20)), Color.FromArgb(0, 0, 0, 0)); } for (int i = 0; i < amount; i++) { double positionDiv = 1.98; double X1 = rnd.Next(0, 450) / positionDiv; double Y1 = rnd.Next(0, 450) / positionDiv; double R1 = rnd.Next(300, 650) / 4; float R = (float)R1; float X = (float)X1; float Y = (float)Y1; while (X + R > 1004) { X = 924 - R; } while (Y + R > 1004) { Y = 924 - R; } if(X < 30) { X = 30; } if(Y < 30) { Y = 30; } DrawGrad(X, Y, R, Color.FromArgb(255, 0, 0, rnd.Next(40, 64)), Color.FromArgb(0, 0, 0, rnd.Next(13, 17))); }
I'm just wondering if anyone knows of other C # methods that could create an island using perlin noise? Any advice would be greatly appreciated.