Giter Site home page Giter Site logo

3d-mesh-uniform-point-sampling's Introduction

3D Mesh Uniform Point Sampling

Simple header-only random point generator over 3D surfaces.

GLM is the graphics math library used (only dependency used), but the code is easily changed to use others such as Eigen.

The point distribution is uniform, that is, it doesn't rely solely on vertex positions and has no face size biases (points aren't, however, evenly spaced in this implementation). Face size bias is removed by sampling a triangle, picking a random index from a cumulative face area array.

A point P is generated using the following formula:

β and α are random numbers. The square root of β sets the percentage from vertex A to the opposing edge, while α represents the percentage along that edge. Taking the square-root of β gives a uniform random point with respect to surface area.

Reference:

Bernard Chazelle David Dobkin Robert Osada, Thomas Funkhouser. Shape Distributions. ACM Transactions on Graphics, 2002.

3d-mesh-uniform-point-sampling's People

Contributors

to-silva avatar

Stargazers

Miracle_Walker avatar  avatar Garry Jolley-Rogers avatar  avatar Gonçalo Pereira avatar

Watchers

James Cloos avatar  avatar

Forkers

wjyonly

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.