Quick Start
DailyCuble Language (DCL) is a domain-specific language for creating 3D voxel shapes. Write a single expression that evaluates at every point in a 3D grid to determine its color.
Your DCL code runs for every coordinate x, y, z in the grid. The result must be a color - that's what fills the voxel at that position. Use NULL (or BLANK) to make voxels empty/transparent.
Your First Shape
The simplest DCL program is just a color name:
This fills every voxel with red. Simple! But let's make it more interesting.
Using Coordinates
DCL provides three built-in variables: x, y, and z. These range from -SIZE/2 to SIZE/2, centered at the origin.
Conditionals
Use if ... then ... else ... end to make decisions:
Making Shapes
The length(x, y, z) function calculates distance from the origin. Creating a centered sphere is simple:
Use SIZE to make your shapes scale-independent. Try changing the grid size - the sphere stays proportional!
Patterns
The modulo operator % is great for repeating patterns:
