Gallery

71 figures · Open a figure to explore its code.

layout (11)

geometry (10)

plotting (16)

maps (9)

networks (6)

text (5)

math (12)

api (2)

(terrain_map)

Terrain in tiles

A 24-by-24 field of square tiles forms a terraced landscape, with teal lowlands, green slopes, and pale summits. Gaussian hills and a small sinusoidal ripple define the elevation, rounded to steps of 0.3 to create the terraces.

Each tile uses closed Polyline paths for its top and exposed sides. Their corners carry {x, y, z} coordinates; a custom projection on Graph maps them into an isometric view. The example sorts tiles by i + j to draw distant cells first and adds side faces where a tile stands above its neighbor. Interpolated elevation colors and darker side fills give the terrain depth.

Stacks arrange the heading and elevation legend around the graph, while an Overlay positions the compass beside the terrain. The legend samples the same color function as the tile tops.

See three-dimensional projection for another example of shared 3D coordinates on a Graph.