I’m currently working on randomly generating islands using the ideas presented in Polygonal Map Generation by Amit. Check out his Flash demo! I am nowhere as far, yet. I’m writing my code in Perl and producing SVG output.
/pics/5671163434_e3b86d4dde.jpg
See below for source code used. I’d install it on a public server, but unfortunately there are quite some dependencies…
#Maps #Perl #SVG
#! /usr/bin/perl -w 1. Copyright (C) 2011 Alex Schroeder <alex@gnu.org> 1. 1. This program is free software: you can redistribute it and/or modify it under 1. the terms of the GNU General Public License as published by the Free Software 1. Foundation, either version 3 of the License, or (at your option) any later 1. version. 1. 1. This program is distributed in the hope that it will be useful, but WITHOUT 1. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 1. FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 1. 1. You should have received a copy of the GNU General Public License along with 1. this program. If not, see <http://www.gnu.org/licenses/>. use strict; use CGI qw(:standard); use SVG; use Math::Geometry::Voronoi; use Class::Struct; use Math::Fractal::Noisemaker; use List::Util qw(min max); use Data::Dumper; my $points = 3000; my $width = 1000; my $height = 550; my $center_x = $width / 2; my $center_y = $height / 2; my $radius = 500; my %color = (beach => '#a09077', ocean => '#44447a',); struct World => { points => '@', centroids => '@', voronoi => '