Gnurfos / transvoxel_rs

Rust implementation of the Transvoxel algorithm
Apache License 2.0
24 stars 6 forks source link

New Feature: Include weights to triangle calculation #5

Closed davids91 closed 1 year ago

davids91 commented 1 year ago

The triangle vertex positions could be interpolated between the cells they are in between.

By interpolation I mean like this: https://cs.stackexchange.com/questions/71102/interpolation-on-marching-cubes-algorithm https://computergraphics.stackexchange.com/questions/9899/2d-metaballs-with-marching-squares-and-linear-interpolation

Gnurfos commented 1 year ago

If I understand correctly, I'd say this is done:

See https://github.com/Gnurfos/transvoxel_rs/blob/main/src/density.rs#L99

The emitted vertex is not systematically in the middle of the cube edge.