8000 GitHub - qnzhou/implicit_functions: C++ implementation of commonly used implicit functions
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

qnzhou/implicit_functions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implicit functions

This library provides implicit function and its gradient evaulation for the following:

  • Common analytical primitives (spheres, cylinders, cones, etc.)
  • Implicit function generated from point cloud using Variational Implicit Point Set Surface (VIPSS)
  • Implicit shape defined via WGSL shaders (requires the -DIMPLICIT_FUNCTIONS_WITH_SHADER_SUPPORT flag)

Build

mkdir build
cd build

cmake ..
# or
cmake .. -DIMPLICIT_FUNCTIONS_WITH_SHADER_SUPPORT=ON # to enable shader support

make -j8

Implicit function specification

Primitives

Primitives are defined by a set of shape-specific parameters stored in a JSON file. Multiple functions can be stored in the same JSON file. For example, a sphere centered at the origin with radius 1 is defined as:

{
  "sphere": {
    "type": "sphere",
    "center": [0.0, 0.0, 0.0],
    "radius": 1.0
  }
}

See primitives for a list of example specifications.

VIPSS

VIPSS function are defined by a set of points and their radial basis function (RBF) coefficients. Both can be generated using the VIPSS codebase. Here is an example specification:

{
  "vipss": {
    "type": "vipss",
    "points": "points_file.xyz",
    "rbf_coeffs": "coeffs_file.txt"
  }
}

Shaders

Shader-based implicit functions take in a shader file and a parameter, detla, for finite-difference approximation of the gradients. Here is an example spe 503D cification:

{
  "shader": {
    "type": "shader",
    "shader": "key.wgsl",
    "delta": 1e-3
  }
}

About

C++ implementation of commonly used implicit functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.7%
  • CMake 7.9%
  • C 0.4%
0