GithubHelp home page GithubHelp logo

ofxtrianglemesh's Introduction

ofxTriangleMesh

triangle mesh addon for openframeworks

this is based on ofxTriangle, but uses triangle rather than the c++ wrapper triangle++, which allows for more flexability and options in the triangulation.

for example, you can set angle or size constraints on the triangles generated, and have the insertion of steiner points, etc.

there's info here:

https://www.cs.cmu.edu/~quake/triangle.switch.html

the triangle++ wrapper has a heavily modified version of triangle, this uses the straight thing:

https://www.cs.cmu.edu/~quake/triangle.html

note: this addon is pretty rough still, so please test this before using it in production.

examples of smallest minimum angle constraints:

examples of size constraints:

ofxtrianglemesh's People

Contributors

ofzach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxtrianglemesh's Issues

Error with current OF master due to the new glm::tvec3 format in ofPolygon

Hey, I was switching over from ofxTriangle and had a small issue with the current master due to the new vector formats:

addons/ofxTriangleMesh/src/ofxTriangleMesh.cpp:121: error: no matching function for call to 'ofxTriangleMesh::isPointInsidePolygon(glm::tvec3<float, (glm::precision)0u>*, size_t, ofPoint)'
         if( isPointInsidePolygon(&contour[0], contour.size(), getTriangleCenter(tr) ) ) {
                                                                                     ^

I was able to resolve it by changing the isPointInsidePolygon function to look like this:

bool isPointInsidePolygon(ofPolyline polygon, int N, ofPoint p);

I can file a PR, but maybe there is another way of resolving this without changing the function parameters..?

Thanks for the addon! :)

Crash with ofxBox2D

Hi:

ofxTriangleMesh is a great addon that exposes the switches of Triangle, which is much more power that that provided by ofxBox2D. However, it crash with ofxBox2D, probably due to duplication of use of structure triangulateio. Is there way to fix this issue?

Thanks!
Eric

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.