source file of the GNU LilyPond music typesetter
- (c) 1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <math.h>
}
/*
+
+
+ ^ x x
+ |
+height <indent>
+ |
+ v x x
+
+
+
For small w, the height should be proportional to w, for w ->
infinity, the height should rise to a limit asymptotically.
* F (x) = 2/pi * atan (pi x/2)
- * F (x) 1/alpha * x^alpha / (1 + x^alpha)
+ * F (x) = 1/alpha * x^alpha / (1 + x^alpha)
* (etc.)
no experiments for determining the best combinations of F, h_inf and
r_0.
+
+ 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.
+
+ ind = G(w)
+
+ w -> 0, G(w) -> .5 h
+
+ w -> inf, G(w) -> 2*h
+
+ eg.
+
+
+ G(w) = h (w/(w+h_inf) 1.5 + .5 h
+
+
*/
Bezier
{
Bezier curve;
Real height = slur_height (width, h_inf, r_0);
- Real indent = height;
+ Real indent = (width/(h_inf+ width)*1.5 + 0.5) * height;
curve.control_[0] = Offset (0, 0);
curve.control_[1] = Offset (indent, height);