Perlin Noise and Fractal Algorithms

Started by
3 comments, last by omega_001 21 years, 9 months ago
I''m trying to understand how to generate fractal algorithms but I''m not that brillant on math terms. Does anyone know what perturb means and what its function is e.g. its mathematical expression/formula. Also does anyone have any advice or source code (I find it easier to learn if I can see the code and then break it down)on how to create Perlin Noise e.g. with GL_POINTS or texturing to quad. Thanks in advance Kiel.
Advertisement
I don''t know anything about fractals

But for perlin noise you actually generate a texture procedurally. What I''d do is make a .RAW format file in memory (which is basically an array of RGB values) and load it in just like I would for a .RAW file. If you need help loading the texture into memory I believe there is a NeHe tutorial about loading .RAW files.

Hope this helps
How do I generate the texture? Say on an empty texture of 128 by 128 pixels.

Could you provide any answer with some sort of source code as I would only be guessing what to do otherwise.

Thanks in advance Kiel
Whoops I see my answer yesterday wasn''t posted before my connection died again - check this
Perlin noise FAQ
for examples and source code.
To generate the texture its as simple as this:


  char texImageData[128][128][3];  


Or you can even allocate it dynamically. Then when you upload the texture to vid memory (you know, using glTexImage2D and such) you just pass that as the data, and 128 for the width and height.

Now to generate the noise is a whole different topic. I highly recommend this site:

http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

It shows you everything you''ll need to know, from the pseudo random number generator to the smoothing.

Good luck

This topic is closed to new replies.

Advertisement