wo80 / Triangle.NET

C# / .NET version of Jonathan Shewchuk's Triangle mesh generator.
472 stars 85 forks source link

Example 4 - maximum area #21

Closed foxyseta closed 2 years ago

foxyseta commented 2 years ago

Example 4 rightfully assumes equilateral triangles when setting a maximum area constraint:

The boundary segments have a length of 0.2, so we set a maximum area constraint assuming equilateral triangles.

A $1.45$ multiplicative factor is also used to relax this bound a little. I've often seen this kind of technique. This time, though, such a value is hard-coded and undocumented so I couldn't figure out how it was picked. https://github.com/wo80/Triangle.NET/blob/db7987c5e33e5851091a564e1c07c5e9453f6447/src/Triangle.Examples/Examples/Example4.cs#L40 Is it just a matter of trial-and-error fine-tuning that only applies to this specific geometry?

wo80 commented 2 years ago

The value is not specific to the geometry. As you figured out, it's just some relaxation parameter, probably chosen by trial and error. I'll add a comment, to make this more clear, so leave this issue open for now.

Thanks for bringing it up! If you find other places, where information is missing or comments don't match the code, please let me know.