]> git.donarmstrong.com Git - lilypond.git/commitdiff
(slur_shape): make indent dependent on
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 23:21:02 +0000 (23:21 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 7 Apr 2004 23:21:02 +0000 (23:21 +0000)
width. This removes the 'hook' at the end of a long slur.

ChangeLog
lily/bezier-bow.cc

index d83518bbe55d9fddf8ea2132896e7f7bf3bebaea..5d728b62a6b0c4eda084a62495325917d4c1f12b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-04-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/bezier-bow.cc (slur_shape): make indent dependent on
+       width. This removes the 'hook' at the end of a long slur.
+
        * buildscripts/mf-to-table.py (parse_logfile): don't append
        encoding to fontname.
 
index dfd290d499da749df681bd97dd3d9e17064f49a7..257529a7b84149eec45c47617a7a2b23ad9aac77 100644 (file)
@@ -41,7 +41,7 @@ slur_height (Real width, Real h_inf, Real r_0)
 
   * 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.)
 
@@ -54,6 +54,23 @@ slur_height (Real width, Real h_inf, Real r_0)
   no experiments for determining the best combinations of F, h_inf and
   r_0.
 
+
+  The indent is equals 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
@@ -61,7 +78,7 @@ slur_shape (Real width, Real h_inf, Real r_0)
 {
   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);