gradientspace / geometry3Sharp

C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license.
http://www.gradientspace.com
Boost Software License 1.0
1.73k stars 391 forks source link

Do you have any idea to create this kind model with geometry3Sharp library? #33

Closed samyuchao closed 6 years ago

samyuchao commented 6 years ago

It seems use some points and their data on borehole, and then in spatial interpolation construct the signed distance filed, and then create the mesh? 1

https://sketchfab.com/ctech/models?cursor=cD0yMDE2LTA5LTA4KzE2JTNBMzMlM0EwNC44NzE3MzYmcj0x

samyuchao commented 6 years ago

and this one. https://sketchfab.com/models/107154d103bd4b4f8e847546fff2d494

rms80 commented 6 years ago

This is one way: http://mesh.brown.edu/DGP/pdfs/Carr-sg2001.pdf

This mode: https://sketchfab.com/models/c44fbdb8feed4f0393df4814b7772b10 mentions the different techniques - "FastRBF" is that paper (they started a company: fastrbf.com)

The WildMagic library has a radial basis function interpolation implementation: https://geometrictools.com/

it is not that difficult to implement, really - you just solve a matrix. That gives you a function F(x,y,z), which you can plug into a marching cubes mesher, which I do have in g3sharp.

I have a sparse matrix solver (iterative, conjugate gradient) which would work with RBF setups that use locally-supported basis functions. For global support (like FastRBF), you need to solve a dense matrix, which only works up to a few thousand points. After that you need fast-multipole-methods (FMM), which is what FastRBF sells.

samyuchao commented 6 years ago

It seems MarchingCubes can be used to create the model. Is there any function can be used to create DMesh3 with only some points?

rms80 commented 6 years ago

no, not in g3sharp currently.

samyuchao commented 6 years ago

so I have to create a mesh firstly, then convert to DMesh3 object,