Fast raytracing through a 3D grid

版本 1.0.0.0 (4.7 KB) 作者: Ivan Klyuzhin
A fast algorithm to trace a line segment through a uniform 3D voxel grid.
1.3K 次下载
更新时间 2016/4/13

查看许可证

A mex-implementation of the raytracing (voxel traversal) algorithm proposed by J. Amanatides and A. Woo (1987).
The input to the function is a line segment defined by two points in 3D, and the output is a list of linear indexes of voxels that are intersected by the line segment. The function performs efficient grid-line intersection test prior to running the traversal iterations, using the improved method described in [1].
When compiled, this function can run up to 100 times faster (128x128x128 grid) than similar function implemented directly in Matlab ("A fast voxel traversal algorithm for ray tracing by Jesús P. Mena-Chalco").
To compile the mex function, set up the Matlab mex compiler, and run "mex wooRaytrace.cpp". The types and required format of the inputs are described in the .cpp file.
[1] "An efficient and robust ray-box intersection algorithm", A. Williams et al., 2005

引用格式

Ivan Klyuzhin (2024). Fast raytracing through a 3D grid (https://www.mathworks.com/matlabcentral/fileexchange/56527-fast-raytracing-through-a-3d-grid), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2015b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0