Vfill

Syntax:
vfill FILE using x:y:z:radius:(<expression>)

The vfill command acts analogously to a plot command except that instead of creating a plot it modifies voxels in the currently active voxel grid. For each point read from the input file, the voxel containing that point and also all other voxels within a sphere of given radius centered about (x,y,z) are incremented as follows:

  • user variable VoxelDistance is set to the distance from (x,y,z) to that voxel's grid coordinates (vx,vy,vz).
  • The expression provided in the 5th using specifier is evaluated. This expression can use the new value of VoxelDistance.
  • voxel(vx,vy,vz) += result of evaluating <expression>
Example:
vfill "file.dat" using 1:2:3:(3.0):(1.0)
This command adds 1 to the value of every voxel within a sphere of radius 3.0 around each point in file.dat.

Example:

vfill "file.dat" using 1:2:3:4:(VoxelDistance < 1 ? 1 : 1/VoxelDistance)
This command modifies all voxels in a sphere whose radius is determined for each point by the content of column 4. The increment added to a voxel decreases with its distance from the data point.

Note that vfill always increments existing values in the current voxel grid. To reset them to zero, use vclear.

Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
Distributed under the gnuplot license (rights to distribute modified versions are withheld).