Divooka Reference

Worlds

11 nodes

On this page 11

Earth World

Function

The Earth as it was measured: every cell's exact height from NOAA's ETOPO5, the land's elevation and the sea floor's depth in metres, averaged from its 5-minute grid onto the world's, with the sea at 0 m.

Signature
EarthWorld(width: Integer, addDetail: Truth) -> World
World EarthWorld(int width = 2048, bool addDetail = true)

Parameters

nametypedefaultdescription
widthInteger2048Cells around the equator, 2 to 2,048; the world is half as many cells from pole to pole.
addDetailTruthTrueWhether the planet grows its own procedural detail between and below the measured cells, which a close view or a flight needs; off, every view shows the measurements as they are.

Returns

WorldWorld

Remarks

ETOPO5 (NOAA, National Geophysical Data Center, 1988) is in the public domain and travels beside this toolbox with its notice. Its grid is finer than any world's, so a wider world is a sharper Earth; at the most, 2,048 cells, a cell is about 20 km across at the equator. Below that the planet grows its own detail, as it does in a painted world, unless Add Detail is off.

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

New World

Function

A new world of open ocean, ready to paint.

Signature
NewWorld(width: Integer, height: Integer, seed: Number) -> World
World NewWorld(
    int width = 1024,
    int height = 512,
    double seed = 0.618034)

Parameters

nametypedefaultdescription
widthInteger1024Cells around the equator, 2 to 2,048.
heightInteger512Cells from pole to pole, 1 to 2,048; half the width keeps cells square.
seedNumber0.618034The seed the planet's procedural detail grows from.

Returns

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

Open World

Function

Opens a world saved by Fantasy Planet Painter: an .fpp2 file, or a .planet file from version 1, which is given Physical World elevations as the app gives them.

Signature
OpenWorld(path: Text) -> World
World OpenWorld(string path)

Parameters

nametypedefaultdescription
pathText—The file to open.

Returns

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

Random World

Function

A new world of continents drawn by Fantasy Planet Painter's Randomize: coherent land, seas and mountain ranges from a seed.

Signature
RandomWorld -> World
    seed: Integer
    width: Integer
    height: Integer
World RandomWorld(
    int seed = 1,
    int width = 1024,
    int height = 512)

Parameters

nametypedefaultdescription
seedInteger1Which world: the same seed always draws the same continents.
widthInteger1024Cells around the equator, 2 to 2,048.
heightInteger512Cells from pole to pole, 1 to 2,048.

Returns

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

Rename World

Function

The world with a new name.

Signature
RenameWorld(world: World, name: Text) -> World
World RenameWorld(World world, string name)

Parameters

nametypedefaultdescription
worldWorld—The world.
nameText—The planet's name.

Returns

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

Sample Earth World

Function

The Earth the app starts with: a coarse 48 × 24 painting of the continents, with Physical World elevations, from which the planet grows the rest of its detail. Earth World is the Earth as it was measured.

Signature
SampleEarthWorld() -> World
World SampleEarthWorld()

Returns

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

Save Planet File

Function

Saves a world as a .planet file for version 1 and the tools that read it. Only the visible terrain survives, flattened into the nine classic heights, with the places.

Signature
SavePlanetFile(world: World, path: Text) -> Text
string SavePlanetFile(World world, string path)

Parameters

nametypedefaultdescription
worldWorld—The world to save.
pathText—Where to save it, ending in .planet.

Returns

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

Save World

Function

Saves a world as an .fpp2 file, which Fantasy Planet Painter opens.

Signature
SaveWorld(world: World, path: Text) -> Text
string SaveWorld(World world, string path)

Parameters

nametypedefaultdescription
worldWorld—The world to save.
pathText—Where to save it, ending in .fpp2. A file already there is replaced only once the new one is complete.

Returns

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

Set Radius

Function

The world with another planet radius: the same painting on a larger or smaller planet, which changes distances, the scale bar and how far the 3D view sees.

Signature
SetRadius(world: World, kilometres: Number) -> World
World SetRadius(World world, double kilometres)

Parameters

nametypedefaultdescription
worldWorld—The world.
kilometresNumber—The radius, 1,000 to 100,000 km; the Earth's is 6,371.

Returns

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

Set Seed

Function

The world with another seed for its procedural detail: the painted terrain stays, the detail between the cells and the clouds change.

Signature
SetSeed(world: World, seed: Number) -> World
World SetSeed(World world, double seed)

Parameters

nametypedefaultdescription
worldWorld—The world.
seedNumber—The new seed.

Returns

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

World From Heights

Function

A new world whose terrain is a heightfield in metres, such as Procedural Terrain makes: each value becomes one cell's exact height.

Signature
WorldFromHeights -> World
    heights: Scalar Field
    seaLevel: Number
    addDetail: Truth
    seed: Number
World WorldFromHeights(
    ScalarField2D heights,
    double seaLevel = 0,
    bool addDetail = false,
    double seed = 0.618034)

Parameters

nametypedefaultdescription
heightsScalar Field—Heights in metres on the datum, row by row from the north.
seaLevelNumber0The height of the sea, in metres on the same datum.
addDetailTruthFalseWhether the planet adds its own procedural detail between and below the cells, as a painted world has; off, it shows the field as it is.
seedNumber0.618034The seed the planet's detail grows from.

Returns

WorldWorld

Remarks

The field is the world's painting grid, so it spans longitude −180° to 180° across and latitude 90° to −90° down, and at most 2,048 cells each way. A value that is not a number leaves its cell empty.

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