• Advertisement
Sign in to follow this  

S-hull

This topic is 833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Edited by taby

Share this post


Link to post
Share on other sites
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 ...

Share this post


Link to post
Share on other sites

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).

Edited by taby

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Edited by taby

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement