Shore
22 nodes
On this page 22
Add Shore Body
FunctionThe shore with a rigid body on it, made by the Box, Sphere, Capsule and the other body nodes. A body lighter than the water (1025 kg/m³) floats where the water is deep enough to carry it, rises and falls with the waves and goes where the flow takes it; where the water is too shallow, or has drained away, it lies on the bed. A heavier body sinks to the bed and stays. Bodies collide with each other. They do not disturb the water.
AddShoreBody -> Shore Scene Description
scene: Shore Scene Description
body: Body DescriptionShoreSceneDescription AddShoreBody(
ShoreSceneDescription scene,
BodyDescription body)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| body | Body Description | — | The body. Put it at about the sea's level to float, or just above the sand to lie there (Shore Bed Height gives the sand's height at a point). |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Add Shore Mound
FunctionThe shore with a mound on its bed: a sand bar the waves break on first, a rock, an island; or, with a negative height, a channel or a pool.
AddShoreMound -> Shore Scene Description
scene: Shore Scene Description
position: Vector3d
radius: Number
height: Number
stretch: NumberShoreSceneDescription AddShoreMound(
ShoreSceneDescription scene,
Vector3d position,
double radius = 10,
double height = 1.5,
double stretch = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| position | Vector3d | — | The mound's middle (m); its Z is not used. |
| radius | Number | 10 | How wide it is (m). |
| height | Number | 1.5 | How high it stands above the bed around it (m); negative digs. |
| stretch | Number | 1 | How many times longer it is along the shore (Y) than across it: 1 is round, 10 a bar. |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Add Shore Trigger
FunctionThe shore with a trigger for its bodies, made by the Triggers nodes: at a time, at every interval, or when a body touches another, rises or falls past a height or moves faster than a speed, it pushes a body, releases one that was held, spawns a copy of one or removes one. A boat let go from the sand as the tide of waves reaches it, driftwood arriving piece by piece. Triggers are looked at after every step of the bodies, in the order they were added; what they did is in the events of Shore Bodies. A shore does not take Water In Region, Detonate, Set Wind or Unpin Cloth, and says so here.
AddShoreTrigger -> Shore Scene Description
scene: Shore Scene Description
trigger: Trigger DescriptionShoreSceneDescription AddShoreTrigger(
ShoreSceneDescription scene,
TriggerDescription trigger)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| trigger | Trigger Description | — | The trigger. |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Export Shore Meshes
FunctionWrites the water's surface at every recorded frame of a run as a mesh file, in metres and Divooka's axes (+Z up). Returns the files written.
ExportShoreMeshes -> Text Array
result: Shore Result
folder: Text
prefix: Text
format: Text
every: Integerstring[] ExportShoreMeshes(
ShoreResult result,
string folder,
string prefix = "shore",
string format = "ply",
int every = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| folder | Text | — | The folder; created if missing. |
| prefix | Text | shore | File name prefix: files are prefix.0001.ply and on. |
| format | Text | ply | The file format: ply (binary, the smallest), obj or stl. |
| every | Integer | 1 | Use every cell (1), every second one (2) and so on. |
Returns
| result | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
New Beach
FunctionA beach: a bed that lies flat under the sea for the first part of the way from -X, then rises evenly through the waterline to the land at +X, the same all along Y. Add Shore Mound gives it bars, rocks and channels.
NewBeach -> Shore Scene Description
length: Number
width: Number
position: Vector3d
depth: Number
rise: Number
cellSize: NumberShoreSceneDescription NewBeach(
double length = 200,
double width = 120,
Vector3d position,
double depth = 5,
double rise = 3,
double cellSize = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| length | Number | 200 | The area's extent along X, from the sea to the land (m). |
| width | Number | 120 | Its extent along Y, along the shore (m). |
| position | Vector3d | — | The corner of the area at its lowest X and Y (m). |
| depth | Number | 5 | How deep the sea is where the swell comes in (m). |
| rise | Number | 3 | How high the land is at the far end, above the sea (m). |
| cellSize | Number | 0.5 | The size of a cell (m): the smallest detail of the water. A wave wants a dozen cells along its length. |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
New Shore From Heights
FunctionA shore whose bed is a picture: dark is low and bright is high. The picture is stretched over the area, its left edge at the sea (-X) and its top at the highest Y. A terrain painted or made by other nodes becomes a coast.
NewShoreFromHeights -> Shore Scene Description
heights: Pixel Image
length: Number
width: Number
position: Vector3d
lowest: Number
highest: Number
cellSize: NumberShoreSceneDescription NewShoreFromHeights(
PixelImage heights,
double length = 200,
double width = 120,
Vector3d position,
double lowest = -5,
double highest = 5,
double cellSize = 0.5)Parameters
| name | type | default | description |
|---|---|---|---|
| heights | Pixel Image | — | The picture; its brightness is the height. |
| length | Number | 200 | The area's extent along X (m). |
| width | Number | 120 | Its extent along Y (m). |
| position | Vector3d | — | The corner of the area at its lowest X and Y (m). |
| lowest | Number | -5 | The height black stands for (m): below the sea's level, which is 0. |
| highest | Number | 5 | The height white stands for (m). |
| cellSize | Number | 0.5 | The size of a cell (m). |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Set Shore Look
FunctionThe shore looking differently in pictures.
SetShoreLook -> Shore Scene Description
scene: Shore Scene Description
sunDirection: Vector3d
ripples: TruthShoreSceneDescription SetShoreLook(
ShoreSceneDescription scene,
Vector3d sunDirection,
bool ripples = true)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| sunDirection | Vector3d | — | Where the sun stands, as a direction towards it. |
| ripples | Truth | True | Show small wind waves on top of the swell. |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Set Shore Sea
FunctionThe shore with the sea of an Ocean scene coming in: the long waves of that scene's wind are the shore's swell, in place of the two regular ones, and its short waves the ripples in pictures. A coast is then one wind in two scenes: the open sea of the Ocean nodes, and its waves shoaling and breaking here. Only waves long against the water at the sea's side come in, which the shallow water can carry: Shore Sea Height says how high they are, and a light wind over deep water sends in none. Set Shore Waves after this adds a regular swell from far off on top.
SetShoreSea -> Shore Scene Description
scene: Shore Scene Description
sea: Ocean Scene DescriptionShoreSceneDescription SetShoreSea(
ShoreSceneDescription scene,
OceanSceneDescription sea)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| sea | Ocean Scene Description | — | The sea: its wind's speed and direction and its seed are taken. A wind that blows to +X (0°) comes straight on shore; one that blows along the shore or off it sends its waves in slanted, or not at all. |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Set Shore Waves
FunctionThe shore with another swell coming in from the sea.
SetShoreWaves -> Shore Scene Description
scene: Shore Scene Description
amplitude: Number
period: Number
secondAmplitude: Number
secondPeriod: NumberShoreSceneDescription SetShoreWaves(
ShoreSceneDescription scene,
double amplitude = 0.4,
double period = 8,
double secondAmplitude = 0.25,
double secondPeriod = 9.7)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| amplitude | Number | 0.4 | The swell's height from its middle to its crest (m): 0.4 breaks gently on a beach, 1 is surf. |
| period | Number | 8 | Its period (s): 6 is wind sea, 8 to 12 swell from far off. |
| secondAmplitude | Number | 0.25 | The height of a second swell (m), which makes the waves come in sets; 0: none. |
| secondPeriod | Number | 9.7 | The second swell's period (s). |
Returns
| result | Shore Scene Description |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Bed
FunctionThe shore's bed as a mesh: the sand, the bars and the rocks, without the water. The 3D view draws it.
ShoreBed -> Streamed Vertex Mesh Data
scene: Shore Scene Description
every: IntegerStreamedVertexMeshData ShoreBed(
ShoreSceneDescription scene,
int every = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| every | Integer | 1 | Use every cell (1), every second one (2) and so on: a coarser mesh of a large shore. |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Bed Height
FunctionThe bed's height (m) at a point.
ShoreBedHeight -> Number
scene: Shore Scene Description
position: Vector3ddouble ShoreBedHeight(
ShoreSceneDescription scene,
Vector3d position)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| position | Vector3d | — | The point; its Z is not used. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Bodies
FunctionThe motion of the shore's bodies over a recorded run, as a result the Results nodes read (Body Position, Body Path, Bodies Mesh) and the 3D view plays. Its frames are the run's own: frame 3 of it is the bodies at the run's recorded frame 3.
ShoreBodies(result: Shore Result) -> Simulation Result
SimulationResult ShoreBodies(ShoreResult result)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
Returns
| result | Simulation Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Foam Map
FunctionThe foam at a recorded frame as a picture seen from above: white where waves have broken. Columns run along X (the sea at the left) and the top row is the highest Y.
ShoreFoamMap -> Pixel Image
result: Shore Result
frame: IntegerPixelImage ShoreFoamMap(ShoreResult result, int frame)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| frame | Integer | — | The recorded frame, from 0. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Frame Count
FunctionHow many frames a run recorded.
ShoreFrameCount(result: Shore Result) -> Integer
int ShoreFrameCount(ShoreResult result)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Frame Time
FunctionThe simulated time of a recorded frame (s).
ShoreFrameTime(result: Shore Result, frame: Integer) -> Number
double ShoreFrameTime(ShoreResult result, int frame)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | |
| frame | Integer | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Picture
FunctionRuns the shore for a time and takes a picture of it: the sand, the water with its foam, the bodies where the water has taken them, and the flat sea beyond the area, under the scene's sun.
ShorePicture -> Pixel Image
scene: Shore Scene Description
time: Number
eye: Vector3d
target: Vector3d
width: Integer
height: Integer
fieldOfView: NumberPixelImage ShorePicture(
ShoreSceneDescription scene,
double time,
Vector3d eye,
Vector3d target,
int width = 640,
int height = 480,
double fieldOfView = 40)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| time | Number | — | How long to run before the picture (s). |
| eye | Vector3d | — | Where the camera stands (m). |
| target | Vector3d | — | What it looks at (m). |
| width | Integer | 640 | The picture's width in pixels. |
| height | Integer | 480 | The picture's height in pixels. |
| fieldOfView | Number | 40 | The camera's vertical field of view in degrees. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Run Up
FunctionHow far up the beach the water has run at a recorded frame: the largest X (m) that is wet.
ShoreRunUp(result: Shore Result, frame: Integer) -> Number
double ShoreRunUp(ShoreResult result, int frame)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| frame | Integer | — | The recorded frame, from 0. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Sea Height
FunctionThe significant height (m) of the sea that comes in at the shore's sea side: the mean height, trough to crest, of the highest third of its waves there. 0 when the shore has no sea (Set Shore Sea), or when all of its wind's waves are too short for the water at that side to carry as shallow water does: a stronger wind or a shallower sea side lets them in. A sea more than about half as high as the water is deep breaks as soon as it enters.
ShoreSeaHeight(scene: Shore Scene Description) -> Number
double ShoreSeaHeight(ShoreSceneDescription scene)
Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Surface
FunctionThe water's surface at a recorded frame as a mesh: an open sheet over the cells that are wet, which ends where the beach is dry. The 3D view draws it; with Shore Bed under it, it is the shore.
ShoreSurface -> Streamed Vertex Mesh Data
result: Shore Result
frame: Integer
every: IntegerStreamedVertexMeshData ShoreSurface(
ShoreResult result,
int frame,
int every = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| frame | Integer | — | The recorded frame, from 0. |
| every | Integer | 1 | Use every cell (1), every second one (2) and so on. |
Returns
| result | Streamed Vertex Mesh Data |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Water Depth
FunctionHow deep the water is at a point at a recorded frame (m): 0 where the sand is dry. With a body's position it says whether the body is afloat or aground.
ShoreWaterDepth -> Number
result: Shore Result
frame: Integer
position: Vector3ddouble ShoreWaterDepth(
ShoreResult result,
int frame,
Vector3d position)Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| frame | Integer | — | The recorded frame, from 0. |
| position | Vector3d | — | The point; its Z is not used. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Shore Water Volume
FunctionHow much water is on the area at a recorded frame (m³).
ShoreWaterVolume(result: Shore Result, frame: Integer) -> Number
double ShoreWaterVolume(ShoreResult result, int frame)
Parameters
| name | type | default | description |
|---|---|---|---|
| result | Shore Result | — | The run. |
| frame | Integer | — | The recorded frame, from 0. |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation
Simulate Shore
FunctionRuns the shore for a time and records the water at every frame, for the surface nodes to read. A frame is 8 bytes a cell, so record few frames of a large shore (Keep Every). The first waves take a while to cross the area: at 5 m depth they travel 7 m a second.
SimulateShore -> Shore Result
scene: Shore Scene Description
duration: Number
framesPerSecond: Number
keepEvery: IntegerShoreResult SimulateShore(
ShoreSceneDescription scene,
double duration = 30,
double framesPerSecond = 30,
int keepEvery = 30)Parameters
| name | type | default | description |
|---|---|---|---|
| scene | Shore Scene Description | — | The shore. |
| duration | Number | 30 | How long to run (s). |
| framesPerSecond | Number | 30 | Frames per second of simulated time. |
| keepEvery | Integer | 30 | Record every frame (1), every second one (2) and so on; the last frame is always recorded. |
Returns
| result | Shore Result |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Shore
- Package
- Physics Simulation