dda-voxelize

Crates.iodda-voxelize
lib.rsdda-voxelize
version0.2.0-alpha.1
sourcesrc
created_at2024-05-30 00:10:42.674611
updated_at2024-06-10 11:49:21.165446
description3D mesh voxelization with the DDA algorithm
homepage
repositoryhttps://github.com/MIERUNE/dda-voxelize-rs
max_upload_size
id1256338
size256,634
crates-io (github:mierune:crates-io)

documentation

README

dda-voxelize

test Crates.io Version

Work in progress.

A 3D mesh voxelizer implemented in Rust using the DDA (Digital Differential Analyzer) algorithm. The DDA method is simple and very fast when only the surfaces (not volumes) of 3D objects need to be voxelized.

1716994116122

DDA Algorithm Overview

See also: Digital differential analyzer - Wikipedia

The DDA algorithm is a fast line drawing method commonly used in computer graphics. It incrementally steps along the major axis of the line (X or Y), while computing the corresponding value on the minor axis at each step. This allows lines to be drawn efficiently by only visiting the pixels/voxels that the line actually intersects.

For 3D voxelization, the DDA algorithm can be extended to incrementally step along the dominant axis (X, Y, or Z), while tracking the intersection points on the other two axes. This enables rapid traversal of the voxel grid to tag all voxels overlapping with the geometry.

Example

Run the example: cargo run --package dda-voxelize --example voxelize

Commit count: 19

cargo fmt