Author Topic: DelaunatorSharp, Delaunay triangulation, tin  (Read 233 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7160
  • AKA Daniel
DelaunatorSharp, Delaunay triangulation, tin
« on: October 26, 2021, 08:40:22 PM »


Worthy of its own thread as its very impressive performance, might be useful
Source is https://github.com/nol1fe/delaunator-sharp

Note the original source is 2D, but the input point set is const, so the indexing seems to work on any array. See my notes in the code.
It could have been faster, but the authors used their own point class, so there’s memory duplication.

GenTin number of points= 41769, time in Milliseconds = 31
GenTin number or points= 1000004, time in Milliseconds = 812


Retired

MickD

  • King Gator
  • Posts: 3513
  • (x-in)->[process]->(y-out)
Re: DelaunatorSharp, Delaunay triangulation, tin
« Reply #1 on: October 26, 2021, 10:48:17 PM »
Will definitely take a look as time permits, C# is pretty impressive speed wise, especially after a run or two to set up the JIT compiled code. From all accounts it can be the same speed or close enough to as C/C++'s speed if done correctly.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." — John Johnson

huiz

  • Swamp Rat
  • Posts: 891
  • Certified Prof C3D
Re: DelaunatorSharp, Delaunay triangulation, tin
« Reply #2 on: October 27, 2021, 02:15:24 AM »
It is worth mentioning the license, which is MIT, and therefor you can use it in your own application without restrictions.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7160
  • AKA Daniel
Re: DelaunatorSharp, Delaunay triangulation, tin
« Reply #3 on: October 27, 2021, 03:12:35 AM »
Will definitely take a look as time permits, C# is pretty impressive speed wise, especially after a run or two to set up the JIT compiled code. From all accounts it can be the same speed or close enough to as C/C++'s speed if done correctly.

Yes very close indeed.
Milliseconds = 812 C#
Milliseconds = 645 C++;

Though there’s one function in https://www.theswamp.org/index.php?topic=57094.msg606824#msg606824

That caused .NET to stall miserably, pointInTriangle, which is an interesting case
Retired