bruit de perlin
This commit is contained in:
@@ -17,15 +17,16 @@ public class Ligne extends ObjetGraphique {
|
||||
protected double limiteHaut = 50;
|
||||
protected double limiteBas = 550;
|
||||
|
||||
public Ligne() {
|
||||
public Ligne(NoiseGenerator noiseGenerator) {
|
||||
double x = 0;
|
||||
double y = 200;
|
||||
double dx, dy;
|
||||
|
||||
Segment s;
|
||||
for (int i = 0; i < nbSegments; i++) {
|
||||
dx = Math.random() * 20 + 80;
|
||||
dy = Math.random() * 40 - 20;
|
||||
dx = 10;
|
||||
|
||||
dy = noiseGenerator.noise(x / 15) * 8;
|
||||
|
||||
if (y + dy > limiteBas) {
|
||||
dy = limiteBas - y;
|
||||
|
||||
Reference in New Issue
Block a user