Perlin Noise/fr

From Free Pascal wiki
Revision as of 10:42, 16 June 2007 by Paulatreides (talk | contribs)
Jump to navigationJump to search

English (en) français (fr) 中文(中国大陆)‎ (zh_CN)

Cette page est le début d'un tutoriel au sujet de comment employer le bruit de Perlin sur des applications LCL pour produire au look natuel. Il couvrira la théorie de base et les exemples d'usage réel, avec un focus sur des exemples compilable.

Le bruit de Perlin a été inventé par Ken Perlin pour produire des textures pour un film a appelé Tron . Aujourd'hui il est employé largement sur des films et des jeux vidéo pour produire de la fumée d'aspect naturel, des paysages, des nuages et toute texture comprenant du marbre, du verre irrégulier, etc.

Demarrer

Perlin Noise is based on the idea of fractals, that things in nature show different degrees of change. On a rocky mountain landscape for example when can see changes with a very big amplitude, which are the mountains themselves. Smaller changes represent irregularities on those mountains and even smaller ones represent rocks.

mountain landscape.png


First Example

This application demonstrates a simple noise function with the following properties:

  • Only 1 harmonic present
  • Amplitude of 250 pixels
  • Wavelength of 20 pixels
  • Frequency of 0.05
  • You can use a combo box to choose between Linear, Cossine and Cubic interpolation

Noise1D.png

Files:

  • noise1d.lpi
  • noise1d.dpr
  • noise.pas

Persistence Example

This application demonstrates how to sum many noise functions to get a perlin noise function. It has the following properties:

  • 3 harmonics present
  • Amplitudes of 250, 125 and 62 pixels
  • Wavelength of 20, 10, and 5 pixels
  • Frequency of 0.05, 0.1, 0.2
  • You can use a combo box to choose between Linear, Cossine and Cubic interpolation

Perlin1D.png

Files:

  • perlin1d.lpi
  • perlin1d.dpr
  • noise.pas

Subversion

You can download the source code for the examples and the library using this command:

svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/examples/noise noise

External Links

  • Article with the theory of Perlin Noise.