# How to show terrain and 3d grid

**URL:** <https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491>\
**Category:** Coding Questions\
**Created:** [March 13, 2021, 10:12am UTC](https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491 "2021-03-13T10:12:56Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [March 13, 2021, 2:37pm UTC](https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491/13 "2021-03-13T14:37:22Z")

</div>

@[micuat](https://discourse.processing.org/u/micuat)

yes you are true i played with it once

> [@How to add image to terrain sketch](https://discourse.processing.org/t/how-to-add-image-to-terrain-sketch/28158/2):
>
> int cols, rows; int scl = 20; int w = 2000; int h = 1600; float flying = 0; float[][] terrain; PImage img; void setup() { size(600, 600, P3D); cols = w / scl; rows = h/ scl; terrain = new float[cols][rows]; //String = img; img = loadImage( "vv.png"); texture(img); } void draw() { flying -= 0.1; float yoff = flying; for (int y = 0; y \< rows; y++) { float xoff = 0; for (int x = 0; x \< cols; x++) { terrain[x][y] = map(noise(xoff, yoff), 0, 1, -10…

thanks for your care

---

_[View the full topic](https://discourse.processing.org/t/how-to-show-terrain-and-3d-grid/28491)._
