Lost hours just because peoples create fake functions …

Nevermind, thanks for your tutorial ]]>

var c = noise(nx,ny,nz,nw);

var x1 = 0, x2 = 2;

var y1 = 0, y2 = 2;

var dx = x2 – x1;

var dy = y2 – y1;

// Sample noise at smaller intervals

var s = x / width;

var t = y / height;

// Calculate our 4D coordinates

nx = x1 + Math.cos (s*2*Math.PI) * dx/(2*Math.PI);

ny = y1 + Math.cos (t*2*Math.PI) * dy/(2*Math.PI);

nz = x1 + Math.sin (s*2*Math.PI) * dx/(2*Math.PI);

nw = y1 + Math.sin (t*2*Math.PI) * dy/(2*Math.PI);

var c = noise(nx,ny,nz,nw);

The tiletype determines if it is land or water. ]]>

Thank you for this tutorial – it is incredibly helpful. One quick question … you mention above:

It would be nice if we could determine a few things, such as:

Where are the Lakes?

Where are the Oceans?

Where are the Land Masses?

How big are each of these?

I understand how you identified the Water and Land TileGroup based on Collidable, but how did you isolate the Lakes and the Small Islands as shown in the last two textures?

I presume it must have something to do with Size, but I can’t quite figure out how you used FloodFill to achieve that.

]]>float heightValue = (float)HeightMap.Get (nx, ny, nz, nw);

call I almost never get any values greater than 0 with the 4D cylinders. Is that normal?

]]>if (sum <= MaxValue)

value = MaxValue;

why value=MaxValue even if there the liquid amount is less than MaxValue?

I read the blog in the references and there is not a clear explanation in there too.

And thanks this writing is really helpful.

]]>float xDelta = latExtent / (float)Width;

float yDelta = lonExtent / (float)Height;

but lattitued specifies the north–south position, i..e Y and longitude specifies the west–east position, i.e. X, but in this bugfix polar coordinates are inverted. ]]>