Skip to content

3. World API

This section will describe Gustave's high-level API: Worlds.

Its usage is simple: run a transaction to add/remove/replace blocks in a world. It will automatically group adjacent blocks into independent structures, and compute force distributions. It is then possible to inspect the stress ratio of each link, to test if each structure is stable (and if not, determine which link fails).

For now, this API only support grids of cuboids (like a Minecraft world).

Note

The examples here will only use 2D constructions for easier visualisation, but 3D is supported.

Note

In this tutorial, all quantities are interpreted in the metric system. This is not mandatory when using the unitless distribution. You can interpret them in another natural system of unit: if you choose to interpret 1 unit of length as an imperial foot, 1 unit of mass as an imperial pound, and 1 unit of time as a second, then 1 unit of force must be interpreted as a pound.foot/second².