triangle icon indicating copy to clipboard operation
triangle copied to clipboard

Single precision mode

Open mirkodandrea opened this issue 6 years ago • 3 comments

The triangle C library supports this mode, it would be useful to have a single-precision version of the wrapper.

mirkodandrea avatar Jan 20 '20 16:01 mirkodandrea

I've forked the library and modified it to work in single precision mode. https://github.com/mirkodandrea/triangle-single-precision

mirkodandrea avatar Jan 21 '20 09:01 mirkodandrea

What would be the use case of a single precision version? What do you use it for?

drufat avatar Mar 15 '20 23:03 drufat

We are developing an algorithm which will generate the mesh of a river that should be used as input in the TELEMAC flood modeling software. The triangle library is used to refine the mesh. The model uses SELAFIN input file format, that specifies coordinates in single precision mode.

Converting the output of the double precision mesh to single precision causes problems of instability on the TELEMAC model, since the area of some triangles can become zero after the conversion.

mirkodandrea avatar Mar 16 '20 09:03 mirkodandrea