Giter Club home page Giter Club logo

naive-surface-nets's Introduction

A Documented Simple Naive Surface Nets Implementation

Overview

unit circle generated by naive surface nets

This repository implements the Naive Surface Nets Algorithm which is used to generate a triangular mesh that approximates a given isosurface defined by the level-set { x,y,z in R^3 | f(x,y,z)=isovalue } of a scalar function f: R^3 -> R. The approximation's precision is bounded by a given voxel grid's resolution in which the isosurface to extract is contained. In the main.cpp file, you can find an example use of the surface_nets function which generates a mesh of the unit circle f(x,y,z) = sqrt(x*x + y*y + z*z) - 1.0 at the specified grid resolution. We add libigl as submodule for visualization of the generated triangular meshes.

Goals

This repository aims to provide a clear, simple and documented implementation of the naive surface nets algorithm that is (in my opinion) much needed. Most open source implementations are hard to read and poorly documented, assuming much prior knowledge from the readers or optimized at the expense of readability and simplicity. This repository's implementation assumes minimal prior knowledge of:

The surface_nets.cpp file contains thorough documentation of the surface nets implementation in the form of comments. I hope this will be of help to many for learning mesh generation algorithms.

Dependencies

Building

$ git clone https://github.com/Q-Minh/naive-surface-nets
$ cd naive-surface-nets
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
$ cmake --build build --target App --config Release
# generated executable will be at path ./build/Release/App.exe or ./build/App

Helpful Documentation

naive-surface-nets's People

Contributors

q-minh 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.