plugin delaunay 2d delaunay triangulate mesh generator
Credits: Based on the C# port (Christian Woltering, www.triangle.codeplex.com ) of Triangle by Jonathan Richard Shewchuk, University of California at Berkeley, www.cs.cmu.edu/~quake/triangle.html; www.lichterloh.tv
Triangle creates 2d delaunay triangulations of "Planar Straight Line Graphs", which basically are 2d polygons. These polygons are given by their corner points (in clockwise or counter-clockwise order).
The resulting data (2d points in structured order) can be used to create a mesh in vvvv.
Holes are supported.
Fully spreadable, with helpfile(s).
All my code is MIT
Triangle.net is MIT
(reminder to myself)
Very cool! Cheers
thank you needed indeed!
you're welcome! wanted to do a wrapper for the original triangle code for a while, when I found the very clean c# port the rest was a no-brainer :)
that's a coincidence, @robotanton is working on the exact same library. i wonder how the nodes differ...
aha + oje....maybe we should have some system in place to prevent double developments? btw/fyi, i'm working on implementing this www.igl.ethz.ch/projects/bbw/; and as i need triangle (+tetgen) only as inputs for that i don't mind deleting this page/plugin if robotanton's plugin is more capable (eg this one does not support regions with differing meshing quality.....); or @robotanton feel free to hijack this page ;)
oh yeah, could be interesting in combination with contour. good work.
@u7angel: true, only with rather low quality/density triangulations though, otherwise it might not be fast enough for realtime use.....
and unfortunately none of the contour nodes (neither freeframe and CV.Image) report if a contour is a hole or not :(
for the extrusion mesh to work the triangle node have to indicate if a vertex is on the edge. if I remember well the Triangle library can tell you this information. after in geometry shader you can test which 2 vertices have this tag and create a quad between them for the extrusion wall. it can be solved with a module containing GeometryBuffer and InputElements advanced (for custom semantics)
@microdee: yes indeed, that's what boundary markers are for and I just realized yesterday that they actually are very useful, especially for geometry shaders.....didn't realize yet I'd need it for extrusion too as I remembered there's a way to test it, but obviously that's much better.
Will update asap to support boundary markers! As for the extrusion shader this has to wait a bit, but thanks for the input there, similar to what I had in mind, but again simpler, cheers.
I can do the extrusion in no time if we have the boundary markers ;)
cool + done!
also added smoothing feature which I found while looking up boundary markers....
I do understand exposing the neighbors can be useful, but I wonder when you will need the edges, isn't all the info in indexed vertices (+markers for boundary edges) already? Asking this because www.vvvv.org/contribution/tetgen also supports neighbors + edges- didn't need them yet, but it would be easy to expose there too....
looking forward to your changes :)
Neighbors are better at determining edges apparently then vertex boundary markers as "neighbor < 0 is: opposite edge is boundary". while vertex boundary markers doesn't tell you accurate edge information (like when 2 edges are lying on contour that is making all vertices to lie on contour in that case you can't find out which edges are boundary solely with vertex boundary markers)
+ neighbors can help find smooth normals for the extrusion bevels. For Tetgen neighbors might be used on physics to simulate soft bodies, or do stress simulations. My rule of thumb in this situations are even if I don't immediately know a use case for a data it worth exposing it because someone else might know a use case I have absolutely no knowledge about.
Also you got competition ;) libtessss-+-cv.image-contour
yes, I second that, I do not have to immediately know a usecase for every input/output I expose, others might, however, there's a limit to that I believe, as it still should stay easy to use for evvvverybody, especially not intimidating for beginners. There's hidden pins, yes, but they also make sense to a certain degree only- you'd only want relatively few options to be hidden. Maybe using own datatypes and join/split (+advanced) nodes is the way to go here, keeping the main plugin easy + adding functionality as needed.....
anyways....no release no competition, hehe ;)
well true LibTessss is on github and you have to calculate neighbors yourself. https://github.com/microdee/LibTessss Triangle also generates way nicer results and tells you way much more information too. only reason I tending towards LibTess is that you don't have to indicate explicitly that a contour is a hole, it will use different "modes" to generate holes. like this:
aha, that's interesting indeed, and supposedly easier in most common cases. I'd say they serve different needs too, LibTessss I guess is a lot faster and will be the better option (less inputs) for all cases when you need to mesh any 2d area, not really caring about how it's triangulated.....like you said for some shader applications more points on the edge or inside the mesh (+more information) will be useful though; as eg for shape-aware computations too, which is what I'm working on. plus: they're beautiful :)
I added an upload to have this in pack form. Now it can conveniently go into the packs folder.
oi @dominik, what's the advantage of having it as pack version? or do you just like having both version side by side...? just found a performance leak + going to update tomorrow!
The last version from 22.10.16 is not working here, triangle node is red in any vvvv version I tried. The one before is fine
hi ain, sorry for the late reply, did not see this...please try again with the most recent upload + make sure to download the right zip (normal plugin or pack); if it still doesn't work please let me know what tty is saying....
@drehwurm: out of bounds is pretty generic as it can have lots of reasons - basically it says there is some array somewhere which is smaller than the index used trying to access it; also, from the error message only you can’t tell which array is making problems....
BUT „ran out of precision“ is interesting, as it’s a Triangle.Net specific error (which I found out via google), and it points to the actual problem, see here
Can‘t see line numbers as I’m on my mobile but simply search for ran out of precision - it looks like the triangles you are trying to create are too small for floating point precision; try decreasing the quality of your desired mesh!
very nice contrib, thx man =)
anonymous user login