Implémentations Perlin Noise
Perlin Noise en différents langages
Processing ( JAVA )
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
float freq_X = 0.0;
float freq_Y= 0.0;
float inc = 0.04;
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
float gray = noise(freq_X, freq_Y) * 255; // la fonction NOise génére un bruit bidimentionnel...
stroke(gray); // adopte la couleur Gray
point(x, y); // Colorier le point (x,y)
freq_X= freq_X+ inc;
}
freq_X= 0;
freq_Y= freq_Y+ inc;
} |
je posterai un peu plus tard le code écris en d'autres langages