Function splashsurf_lib::mesh::tri_aspect_ratio
source · pub fn tri_aspect_ratio<RIn: Real, RComp: Real>(
a: &Vector3<RIn>,
b: &Vector3<RIn>,
c: &Vector3<RIn>
) -> RComp
Expand description
Computes the aspect ratio of the given triangle
The aspect ratio is computed as the inverse of the “stretch ratio” S
given by
S = sqrt(12) * (r_in / l_max)
where r_in
is the radius of the in-circle and l_max
is the longest edge of the triangle.
See e.g.: https://www.engmorph.com/2d-element-aspect-ratio-diff-simula.