Giter VIP home page Giter VIP logo

marchingcubes_cppcuda's Introduction

MarchingCubes_CppCuda

The C++ (with cuda) version of the classic Marching Cubes algorithm.

Description

This repo contains the code for the classic Marching Cubes algorithm in C++&Cuda. The input is a SDF tensor with shape (dim-x, dim-y, dim-z). The output is the result reconstructed mesh by the MC algorithm.

Prerequisite Installation

1. eigen3
2. cuda-8.0
3. Python3

How to use the code:

Clone the repo:

    git clone https://github.com/WanquanF/MarchingCubes_CppCuda.git

Build the code with the given script:

    python run.py

Run the testing sample:

    python test.py

Other details:

The code has two kinds of implementations of the MC algorithm. One implementation uses the cpu all the time while the other one uses the gpu for parallel. After you build the code by running the "run.py" script, the exe file is in the "./build" folder, named "marching_cubes_cuda". The command line for using it is like this:

    ./build/marching_cubes_cuda  dim-x  dim-y  dim-z  input-sdf-path  output-mesh-path  if-using-cuda

The "dim-x", "dim-y" and "dim-z" are int numbers showing the shape of the input sdf, and the "if-using-cuda" is a 0/1 (0 means running without cuda, 1 means running with cuda) value deciding which version of implementation you use. The "input-sdf-path" is a bin file of the sdf value tensor. The "output-mesh-path" should be in the obj format.

marchingcubes_cppcuda's People

Contributors

wanquanf avatar

Stargazers

Lei Wang avatar Duotun Wang avatar Junhua Liu avatar Hongrui Cai avatar  avatar  avatar fighting! avatar Fancomi avatar  avatar Tho avatar cvhadessun avatar gaowei avatar  avatar  avatar  avatar  avatar LuoJinhao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.