¿Cómo lleno una matriz 2D con ruido Perlin?

I've devised a small personal project to help me learn how to use Perlin Noise. This project involves filling a 2D array of r filas y c columns with random, coherent data generated with a Perlin Noise algorithm.

Now, I've just spent hours reading a wide variety of resources about generating Perlin Noise. However, it's all over my head and I'm totally lost. I understand the basic concept, but I don't have a clue how to begin implementing this in Java. I think it would be most helpful if someone could show me some well-commented code that accomplishes my goal so I can work backwards and apply it myself.

preguntado el 01 de febrero de 12 a las 04:02

A similar question was asked here that I found useful stackoverflow.com/questions/5531019/perlin-noise-in-java And here's an old Java applet example complete with source code I found dzzd.net/demo/PERLINSample -

3 Respuestas

Si quieres una perfectamente documented implementation, check out este. You can download the código fuente y abierto src\java\org\j3d\texture\procedural\PerlinNoiseGenerator.java to get your commented code. I take no credit for any of this. All I did was hunt around on Google a bit.

Since it's licensed under LGLPL, I'll also provide a enlace directo to it. (If I'm mistaken about what LGLPL means and my ability to do this, please notify me.)

Respondido 10 Feb 12, 00:02

Check out the accepted answer. Ruido Perlin en Java . I am pretty sure this is exactly what you want to do. Just tweak the roughness variable and what is added whenever nextFloat() is called an you got yourself a filled 2d array of Perlin noise.

contestado el 23 de mayo de 17 a las 15:05

Processing provides a Perlin noise generator.

Documentación de referencia

Código fuente busca el noise(...) method(s)

Respondido 05 ago 16, 08:08

Processing != Java - b1nary.atr0phy

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.