gnurfos / transvoxel_rs Goto Github PK
View Code? Open in Web Editor NEWRust implementation of the Transvoxel algorithm
License: Apache License 2.0
Rust implementation of the Transvoxel algorithm
License: Apache License 2.0
Extracted field with surface value threshold 0.0
Same field extracted with surface value threshold 0.01
Same field extracted with surface value threshold 0.1
Have tried using any other value, but it only works with 0.0
. The greater the value, the greater the mess The images describe it better than I ever could :)
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
To help with deciding on how detailed the density information should be, the VoxelData trait could be updated:
Line 39 in 9043633
pub trait VoxelData: Default + Clone + Copy {
/// The type that acts as density
type Density: Density;
/// How to get the density from a given data object
//From: fn density(&self ) -> Self::Density;
fn density(&self, cell_size: f32) -> Self::Density;
}
The function usage inside the library contains this information in let rot = self.current_rotation;
:
transvoxel_rs/src/implementation/algorithm.rs
Line 469 in 9043633
This would make it possible to provide better representative density information through VoxelData by enabling the trait implementers to use the size of the iterating cube.
Hey, I spent the weekend porting your library to C++. Hope you don't mind. It is a bit of a clumsy port. I added a reference back you the original.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.