Voxel Image

This function creates a voxel image from a list of 3D data points using patch.

You are now following this Submission

This function gives an easy solution to show a voxel-based object. Just give the centers of the voxels and the voxel size, and you will get a nice 3D image. Some more features are available, like face color and edge color.

Syntax:
voxel_image(pts, vox_sz, color, alpha, edgec)

Parameters:
pts - n x 3 matrix with 3D points
vox_sz - scalar or 1 x 3 vector with voxel size
color - face color
alpha - face alpha (opacity)
edgec - edge color

Example:

pts = [1,1,1; 2,2,2];
vs = 0.5;
voxel_image(pts, vs);
view([-37.5, 30]);

This example creates two voxels (at (1,1,1) and (2,2,2)) with edges of length 0.5

Cite As

Stefan (2026). Voxel Image (https://www.mathworks.com/matlabcentral/fileexchange/30374-voxel-image), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Images in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.2.0.0

Bug fixed: mtimes error in line 48

1.0.0.0