-- Create an oval in the middle of the map
local iW, iH = Map.GetGridSize();
-- Fill all rows with water plots.
plotTypes = table.fill(g_PLOT_TYPE_OCEAN, iW * iH);
local fracFlags = {FRAC_POLAR = true};
local axis_list = {0.87, 0.81, 0.75};
local axis_multiplier = axis_list[sea_level];
local cohesion_list = {0.60, 0.57, 0.54};
local cohesion_multiplier = cohesion_list[sea_level];
local centerX = iW / 2;
local centerY = iH / 2;
local majorAxis = centerX * axis_multiplier;
local minorAxis = centerY * axis_multiplier;
local majorAxisSquared = majorAxis * majorAxis;
local minorAxisSquared = minorAxis * minorAxis;
for x = 0, iW - 1 do
for y = 0, iH - 1 do
local deltaX = x - centerX;
local deltaY = y - centerY;
local deltaXSquared = deltaX * deltaX;
local deltaYSquared = deltaY * deltaY;
local d = deltaXSquared/majorAxisSquared + deltaYSquared/minorAxisSquared;
if d <= 1 then
local i = y * iW + x + 1;
plotTypes[i] = g_PLOT_TYPE_LAND;
end
end
end