Polygon2Voxel

Convert a triangulated mesh into a voxel volume
ダウンロード: 6.5K
更新 2019/5/20

ライセンスの表示

編集メモ: This file was selected as MATLAB Central Pick of the Week

This function polygon2function will convert a Triangulated Mesh into a Voxel Volume which will contain the discretized mesh.

Discretization of a polygon is done by splitting the polygon in smaller polygons, until the longest edge is smaller than 0.5 voxel, then the voxel beneath the vertice coordinates is set to one.

Note, this new version is pure Matlab (previous version required c++ compiler)

Try the example.

Bugs, successes and other comments are welcome!

引用

Dirk-Jan Kroon (2024). Polygon2Voxel (https://www.mathworks.com/matlabcentral/fileexchange/24086-polygon2voxel), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2009a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.8.0.0

pure Matlab (previous version required c++ compiler)

1.7.0.0

Function now also working without compiling c-code

1.6.0.0

Added boundary options

1.5.0.0

Now first index volume is 1,1,1 instead of 0,0,0, and YXZ dimensions as in Matlab convention (Thanks Yuanming SUO).

1.4.0.0

Changed output to Logicals instead of Double datatype

1.3.0.0

Small Bug fixed, for the case if all vertices are outside the volume. Only not draw the face if they are outside at the same side of the volume.

1.2.0.0

Linux Ubuntu Tested

1.1.0.0

Added center and resize options

1.0.0.0