Code Monkey home page Code Monkey logo

ofxdelaunay's Introduction

ofxDelaunay

Paul Bourke's Delaunay Triangulation implementation.

This is a big refactor from Julapy (Lukasz Karluk) and Pat Long's version (http://code.google.com/p/julapy/source/browse/trunk/openframeworks/ofxDelaunay/?r=708)

Changes:

  • Now uses ofMesh rather than custom data structure
  • uses std::vector for internal storage, which removes need for reallocating memory or constructor/destructors
  • Removed need for setMaxPoints(). No max points enforced

ofxdelaunay's People

Contributors

k2052 avatar micuat avatar obviousjim avatar okjake avatar prisonerjohn 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxdelaunay's Issues

Runtime Error

I added more and more points in the example and got:
example-simplePointsDebug(23443,0xa05e21d4) malloc: *** error for object 0x1813e04: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
(lldb)
caused by line 227 in Delauny.cpp: delete[] edges;

missing code in triangulate()? no longer deleting last three vertices

While trying to troubleshoot a problem, I downloaded your code again instead of using my modified stuff, and it wouldn't work, but in a different way.

comparing older files, I noticed the following lines are missing from the end of your code:

//erase the last three triangles
vertices.erase(vertices.end()-1);
vertices.erase(vertices.end()-1);
vertices.erase(vertices.end()-1);

these would go right before the 'return ntri' and caused all sorts of errors and almost made me cry.

I feel these lines are kinda-sorta important...?

3D support & crashes

From looking at the code, the z coordinate seems to be ignored.

Also, if the loop in Triangulate breaks early due to ntri >= trimax, there can be triangles whose complete flag is still false, which leads to crashes when actually trying to do anything with those triangles.

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.