Divooka Reference

Rendering

7 nodes

On this page 7

Image Size

Function

The size an image of a view has at a longest edge: a whole-world map is twice as wide as it is tall, a globe square.

Signature
ImageSize -> Integer Array
    world: World
    view: View
    longestEdge: Integer
int[] ImageSize(World world, View view, int longestEdge = 1024)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—The view.
longestEdgeInteger1024Pixels on the longest edge.

Returns

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

Make Flight View

Function

A 3D view from a camera flying over the surface.

Signature
MakeFlightView -> View
    latitude: Number
    longitude: Number
    altitude: Number
    heading: Number
    pitch: Number
    clouds: Truth
View MakeFlightView(
    double latitude = 0,
    double longitude = 0,
    double altitude = 8000,
    double heading = 0,
    double pitch = -20,
    bool clouds = true)

Parameters

nametypedefaultdescription
latitudeNumber0The place below the camera, in degrees north.
longitudeNumber0The place below the camera, in degrees east.
altitudeNumber8000The camera's height above the datum, in metres; it is kept clear of the ground.
headingNumber0Where the camera faces, in degrees clockwise from north.
pitchNumber-20How far it looks up or down, in degrees; negative looks down.
cloudsTruthTrueDraw clouds.

Returns

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

Make Globe View

Function

A 3D view of the globe from space, looking down at a place.

Signature
MakeGlobeView -> View
    latitude: Number
    longitude: Number
    zoom: Number
    clouds: Truth
    grid: Truth
View MakeGlobeView(
    double latitude = 20,
    double longitude = 0,
    double zoom = 1,
    bool clouds = true,
    bool grid = false)

Parameters

nametypedefaultdescription
latitudeNumber20The place below the camera, in degrees north.
longitudeNumber0The place below the camera, in degrees east.
zoomNumber1How close: 1 shows the whole globe, larger comes nearer.
cloudsTruthTrueDraw clouds.
gridTruthFalseDraw lines of latitude and longitude over the globe.

Returns

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

Make Map View

Function

A map view: a projection, its colours, where it is centred and how close it stands.

Signature
MakeMapView -> View
    projection: Map Projection
    theme: Map Theme
    relief: Relief Style
    latitude: Number
    longitude: Number
    zoom: Number
    grid: Truth
    sunAzimuth: Number
    sunAltitude: Number
    reliefExaggeration: Number
View MakeMapView(
    MapProjection projection = MapProjection.Equirectangular,
    MapTheme theme = MapTheme.Terrain,
    ReliefStyle relief = ReliefStyle.Simple,
    double latitude = 0,
    double longitude = 0,
    double zoom = 1,
    bool grid = false,
    double sunAzimuth = 315,
    double sunAltitude = 34,
    double reliefExaggeration = 190)

Parameters

nametypedefaultdescription
projectionMap ProjectionEquirectangularHow the sphere is laid out.
themeMap ThemeTerrainWhat the colours show.
reliefRelief StyleSimpleHow relief is lit.
latitudeNumber0The latitude at the view's centre, in degrees.
longitudeNumber0The longitude at the view's centre, in degrees.
zoomNumber1How close: 1 shows the whole world, 4 a quarter of its width.
gridTruthFalseDraw lines of latitude and longitude.
sunAzimuthNumber315Where the sun stands for shadowed relief, clockwise from north.
sunAltitudeNumber34How high the sun stands for shadowed relief, above the horizon.
reliefExaggerationNumber190How strongly relief is lit, 190 as the app draws it.

Returns

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

Orbit Frames

Function

Frames of the 3D globe turning once round under the camera, for an animation.

Signature
OrbitFrames -> Pixel Image Array
    world: World
    frames: Integer
    latitude: Number
    zoom: Number
    longestEdge: Integer
    clouds: Truth
PixelImage[] OrbitFrames(
    World world,
    int frames = 24,
    double latitude = 20,
    double zoom = 1,
    int longestEdge = 256,
    bool clouds = true)

Parameters

nametypedefaultdescription
worldWorld—The world.
framesInteger24How many frames make one turn.
latitudeNumber20The latitude the camera looks down at, in degrees.
zoomNumber1How close: 1 shows the whole globe.
longestEdgeInteger256Pixels on each square frame's edge.
cloudsTruthTrueDraw clouds.

Returns

FramesPixel Image Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Rendering
Package
Fantasy Planet Painter

Render

Function

An image of a world's terrain in a view, with its grid if the view draws one.

Signature
Render -> Pixel Image
    world: World
    view: View
    longestEdge: Integer
PixelImage Render(
    World world,
    View view,
    int longestEdge = 1024)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—The view.
longestEdgeInteger1024Pixels on the longest edge, up to 8,192.

Returns

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

Render Map

Function

An image of a world as a finished map: its terrain with its places, and the world layers it was given in Fantasy Planet Painter, such as countries, rivers and names, with their legend and scale bar.

Signature
RenderMap -> Pixel Image
    world: World
    view: View
    longestEdge: Integer
    worldLayers: Truth
PixelImage RenderMap(
    World world,
    View view,
    int longestEdge = 1024,
    bool worldLayers = true)

Parameters

nametypedefaultdescription
worldWorld—The world.
viewView—The view.
longestEdgeInteger1024Pixels on the longest edge, up to 8,192.
worldLayersTruthTrueDraw the world layers the world shows in the app; off, only places are drawn over the terrain.

Returns

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