Divooka Reference

Elevations

6 nodes

On this page 6

Elevation Levels

Function

The heights the world paints with: its sea and its levels from the deepest.

Signature
ElevationLevels(world: World) -> Elevation Levels
ElevationLevels ElevationLevels(World world)

Parameters

nametypedefaultdescription
worldWorld—The world.

Returns

LevelsElevation Levels
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Elevations
Package
Fantasy Planet Painter

Elevation Patch

Function

A 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.

Signature
ElevationPatch -> Scalar Field
    world: World
    latitude: Number
    longitude: Number
    extentMetres: Number
    cells: Integer
ScalarField2D ElevationPatch(
    World world,
    double latitude,
    double longitude,
    double extentMetres = 8000,
    int cells = 512)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudeNumber—The square's centre, in degrees north.
longitudeNumber—The square's centre, in degrees east.
extentMetresNumber8000How far the square reaches from one edge to the other, 100 m to 200 km.
cellsInteger512Cells along each edge, 16 to 4,096; the cell size is the extent over this.

Returns

HeightmapScalar 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

Function

The 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.

Signature
ElevationRaster -> Scalar Field
    world: World
    view: View
    width: Integer
    height: Integer
ScalarField2D ElevationRaster(
    World world,
    View view,
    int width = 1024,
    int height = 512)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—A map view; the 3D view has no elevation raster.
widthInteger1024Pixels across.
heightInteger512Pixels down.

Returns

ElevationsScalar Field
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Elevations
Package
Fantasy Planet Painter

Redistribute Levels

Function

The world painting with a new spread of levels, from a depth to a summit, as the app's Elevations dialog makes them.

Signature
RedistributeLevels -> World
    world: World
    belowWater: Integer
    depth: Number
    summit: Number
    spacing: Number
    keepHeights: Truth
World RedistributeLevels(
    World world,
    int belowWater = 3,
    double depth = 7000,
    double summit = 4800,
    double spacing = 1.5,
    bool keepHeights = true)

Parameters

nametypedefaultdescription
worldWorld—The world.
belowWaterInteger3How many of the twelve levels lie below the sea, 1 to 10.
depthNumber7000The deepest level's depth below the sea, in metres.
summitNumber4800The highest level's height above the sea, in metres.
spacingNumber1.5How the levels spread: 1 evenly, above 1 closer near the sea.
keepHeightsTruthTrueMove 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

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Elevations
Package
Fantasy Planet Painter

Sample Elevation

Function

The planet's elevation at one place, with the procedural detail it grows below the painted grid, down to the resolution asked for.

Signature
SampleElevation -> Number
    world: World
    latitude: Number
    longitude: Number
    resolution: Number
double SampleElevation(
    World world,
    double latitude,
    double longitude,
    double resolution = 900)

Parameters

nametypedefaultdescription
worldWorld—The world.
latitudeNumber—Degrees north.
longitudeNumber—Degrees east.
resolutionNumber900The finest detail to include, in metres; smaller is finer.

Returns

ElevationNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Elevations
Package
Fantasy Planet Painter

Set Sea Level

Function

The world with its sea at another height: the painted terrain stays, the coasts move.

Signature
SetSeaLevel(world: World, seaLevel: Number) -> World
World SetSeaLevel(World world, double seaLevel)

Parameters

nametypedefaultdescription
worldWorld—The world.
seaLevelNumber—The sea's height, in metres on the datum.

Returns

WorldWorld
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Elevations
Package
Fantasy Planet Painter