Page 1 of 1

(completed) Task: Perlin Generator

Posted: 29 Aug 2008 07:47
by uzurpator
Greetings, to you, dearest of all my friends ;)

There is a task at hand, code wise. The perlin noise generator I use, stored in the gridArray.h. gridArray.c themes.h and themes.c needs a rewrite. Current one is adapted from TTD new terrain generator, it is slow, old, written in c and, worst of all, leaks memory like mad :>.

so I need something like this:

Code: Select all

class perlin_gen
{
double getNoise2d(x,y);
};
Libraries, rest of the interface etc is a decision for you to take.

Re: Task: Perlin Generator

Posted: 13 Nov 2008 17:58
by ohlidalp
Hey.

I think this is what you're looking for http://farao.czweb.org/download/perlin.exe. It belongs to an article at http://farao.czweb.org/perlin.htm, but it's in czech. There is no copyright notice anywhere on the page, and there are a lot of programs to download, so I guess the author won't mind us to use it.

Edit: I forgot to say, the download is a self-extracting archive with sources, not an app.

Re: Task: Perlin Generator

Posted: 13 Nov 2008 20:17
by prissi
You could use the one from simutrans, it is C code in C++ (since for a perlin generator there is no use for C++ in a mathematical formula ... ) http://downloads.sourceforge.net/simutr ... -100-0.zip

file simtools.cc, called from simworld.cc

Re: Task: Perlin Generator

Posted: 22 Nov 2008 23:09
by uzurpator
Thanks for the thumbs up. Ill look into it shortly :)

EDIT: I played abit with simutrans generator, and settle for it for now.