Elevations
6 nodes
On this page 6
Elevation Levels
FunctionThe heights the world paints with: its sea and its levels from the deepest.
ElevationLevels(world: World) -> Elevation Levels
ElevationLevels ElevationLevels(World world)
Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
Returns
| Levels | Elevation Levels |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter
Elevation Patch
FunctionA square of the planet's surface as a heightfield in metres, at the detail of its own cells: the painted terrain and the detail the planet grows below it, laid flat around a place and carrying its real cell size, so Divooka's terrain and landscape nodes take it as they take a surveyed heightmap.
ElevationPatch -> Scalar Field
world: World
latitude: Number
longitude: Number
extentMetres: Number
cells: IntegerScalarField2D ElevationPatch(
World world,
double latitude,
double longitude,
double extentMetres = 8000,
int cells = 512)Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| latitude | Number | — | The square's centre, in degrees north. |
| longitude | Number | — | The square's centre, in degrees east. |
| extentMetres | Number | 8000 | How far the square reaches from one edge to the other, 100 m to 200 km. |
| cells | Integer | 512 | Cells along each edge, 16 to 4,096; the cell size is the extent over this. |
Returns
| Heightmap | Scalar Field |
Remarks
The square is laid on the plane that touches the planet at its centre, north up; across a few kilometres the planet's curve is far below a cell, and the heights are the planet's, not the plane's.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter
Elevation Raster
FunctionThe elevation a map view sees, pixel by pixel, at any size: the planet's own detail at that view's resolution, as Export Height Map writes it but as numbers.
ElevationRaster -> Scalar Field
world: World
view: View
width: Integer
height: IntegerScalarField2D ElevationRaster(
World world,
View view,
int width = 1024,
int height = 512)Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| view | View | — | A map view; the 3D view has no elevation raster. |
| width | Integer | 1024 | Pixels across. |
| height | Integer | 512 | Pixels down. |
Returns
| Elevations | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter
Redistribute Levels
FunctionThe world painting with a new spread of levels, from a depth to a summit, as the app's Elevations dialog makes them.
RedistributeLevels -> World
world: World
belowWater: Integer
depth: Number
summit: Number
spacing: Number
keepHeights: TruthWorld RedistributeLevels(
World world,
int belowWater = 3,
double depth = 7000,
double summit = 4800,
double spacing = 1.5,
bool keepHeights = true)Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| belowWater | Integer | 3 | How many of the twelve levels lie below the sea, 1 to 10. |
| depth | Number | 7000 | The deepest level's depth below the sea, in metres. |
| summit | Number | 4800 | The highest level's height above the sea, in metres. |
| spacing | Number | 1.5 | How the levels spread: 1 evenly, above 1 closer near the sea. |
| keepHeights | Truth | True | Move each painted cell to the new level nearest its old height, so the terrain keeps its shape; off, cells keep their level and change height. |
Returns
| World | World |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter
Sample Elevation
FunctionThe planet's elevation at one place, with the procedural detail it grows below the painted grid, down to the resolution asked for.
SampleElevation -> Number
world: World
latitude: Number
longitude: Number
resolution: Numberdouble SampleElevation(
World world,
double latitude,
double longitude,
double resolution = 900)Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| latitude | Number | — | Degrees north. |
| longitude | Number | — | Degrees east. |
| resolution | Number | 900 | The finest detail to include, in metres; smaller is finer. |
Returns
| Elevation | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter
Set Sea Level
FunctionThe world with its sea at another height: the painted terrain stays, the coasts move.
SetSeaLevel(world: World, seaLevel: Number) -> World
World SetSeaLevel(World world, double seaLevel)
Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| seaLevel | Number | — | The sea's height, in metres on the datum. |
Returns
| World | World |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Elevations
- Package
- Fantasy Planet Painter