S-hull

Started by
15 comments, last by taby 8 years, 3 months ago

Has anyone any experience with the S-hull library? It's for calculating the Delaunay triangulation of some 2D vertices.

http://www.s-hull.org

I can't figure out what Shx::c does. I tried fmod using 2.0*pi as the divisor, to no avail. I'm assuming that r is radial distance.

Or do you have other algorithms that you like best?

Advertisement
As far as I can tell, it looks like "r" is "row" and "c" is "column" -- so, r == y, and c == x.

That being said, this looks like a terrible kind of code dump, provided so the author can say "it's available," not actually provided with a "here's how to really make it useful" manual. Which is half the battle in creating useful libraries, IMO ...
enum Bool { True, False, FileNotFound };

I've now tried taking r and c as x and y... no good. I also tried r and c as radius and angle... no good.

If the good coder would be so kind as to tell us, that would deserve a beer or 12.

The reason I want to get S-hull working is because it generates triangle adjacency data! Very handy for generating the dual of the Delaunay triangulation (the Voronoi diagram).

If you look at the sample code, it reads values for r and c in from files.
Are there sample files? If so, you can use those to figure out what the real use is.

Adjacency isn't that hard to generate from a general triangle mesh, really. You can do it in linear time (by number of triangles) by just walking through each edge for each triangle. Look for the reverse edge in a hash table; if there, you found your match; if not, add the edge with a reference to the originating triangle.
enum Bool { True, False, FileNotFound };

The stupid thing about all this is that I have the triangulation working in 3D, but can't do it in 2D. Thanks for your advice.

Use your 3D code and set Z=0 for all the triangles :-)
enum Bool { True, False, FileNotFound };

Haha, I wish. :)

I went with: http://goanna.cs.rmit.edu.au/~gl/research/comp_geom/delaunay/delaunay.html

Two figures that show that spatial "curvature" causes inward (gravitational) "force" around a 2D black hole. I am trying to make it compatible with a theory called Quantum Graphity.

The image on the left is using Delauney triangulation and the image on the right is the triangulation's dual. Red stripes point inward denoting attraction, green outward denoting repulsion. As you can see, most of it is attractive. You can ignore the green stripes along the event horizon, those would be red when the central complete graph is taken into account.

The hexagon image on the right reminds me of bees LOL. smile.png

The one on the right is not the dual, as the center is not covered.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement