7.1.2 Landscape Generator Guide
for (let x = 0; x < cols - 1; x++) beginShape(TRIANGLE_STRIP); for (let z = 0; z < rows; z++) let y1 = noise(x * scale, z * scale) * amp; let y2 = noise((x + 1) * scale, z * scale) * amp; vertex(x * 10, y1, z * 10); vertex((x + 1) * 10, y2, z * 10);
Map height to color (low = blue/green, high = white/brown). 7.1.2 Landscape Generator
endShape();
function draw() background(0); rotateX(PI / 3); translate(-width / 2, -height / 2, -200); for (let x = 0; x < cols