+
+ The indent is proportional to the height of the slur for small
+ slurs. For large slurs, this gives a certain hookiness at the end,
+ so we increase the indent.
+
+ indent = G (w)
+
+ w -> 0, G (w) -> .33 w
+
+
+ (due to derivative constraints, we cannot have indent > len/3)
+
+ w -> inf, G (w) -> 2*h_inf
+
+ i.e.
+
+
+ G (0) = 0 , G'(0) 1/3, G (infty) = 2h_inf
+
+ solve from
+
+ G (w) = r + p/(w+q)
+
+ yields
+
+ G (w) = 2 h_inf - max_fraction * q^2/ (w + q)
+
+ with q = 2 h_inf
+*/
+
+void
+get_slur_indent_height (Real *indent, Real *height,
+ Real width, Real h_inf, Real r_0)
+{
+ Real max_fraction = 1.0 / 3.1;
+ *height = slur_height (width, h_inf, r_0);
+
+ Real q = 2 * h_inf / max_fraction;
+ *indent = 2 * h_inf - sqr (q) * max_fraction / (width + q);
+}