voxelSurf
This is a fully vectorized method to display voxels in 3d indexed integer data. The colors are chosen according to the colormap, colormap(lines) is recommended.
This method is much faster than other existing voxel plotters and can handle 3d arrays up to 512x512x512 data points easily on computers with a decent graphics card.
(it just needs a lot of ram for large arrays).
Another neat feature is that it displays both colors at the boundary of 2 regimes by cutting the faces of the voxels at the regime boundaries into 2 triangles.
If you use this for academic purposes, please use appropriate credit.
Feel free to post suggestions on what to improve or add.
Cite As
Johann-Lukas Voigt (2024). voxelSurf (https://www.mathworks.com/matlabcentral/fileexchange/66204-voxelsurf), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Surfaces, Volumes, and Polygons > Volume Visualization > Scalar Volume Data >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.11.0.0 | Fixed minor axis bug suggested in comments
|
||
1.10.0.0 | -Added missing methods to run demo script |
||
1.9.0.0 | Added second demo file
|
||
1.8.0.0 | Fixed a small X-Y axis swap bug |
||
1.7.0.0 | Now able to handle different transparency layers. Simply use a complex matrix as an input; the real part is interpreted as an index of the colormap while the imaginary part of each voxel corresponds to the index of a given alphamap |
||
1.6.0.0 | fixed X/Y swap bug. |
||
1.5.0.0 | Updated Example and added more detailed comments. |
||
1.4.0.0 | Added transparency option
|
||
1.3.0.0 | Made description more clear |
||
1.2.0.0 | edited title |
||
1.1.0.0 | Fixed some typos. |
||
1.0.0.0 |