This browser has no WebGPU, so the sketch cannot run here. The program is below, and it runs in a current Chrome, Edge or Safari.

Noise 3D

Volumetric noise sampled across a lattice — the building block for terrain and density fields.

Open in new tab ↗ · 3dnoisesampling

#A{dim = (1);set = (0);run = #;}

&coord = mlt(add( C , mlt(step, 0.005)), 2);

~A{
   dim = (64,64,64);
   i_pos = C;
   shape = CUBE;
   i_scl = 
   lrg(
      LATT.CUBE.QUINTIC[&coord]{dot(nrm(R), D)},
      0.2
   );
}

^cam{
   light = (1,0,0);
   fill = (0,0.2,0);
}