]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.13.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 19 Dec 1999 14:27:33 +0000 (15:27 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 19 Dec 1999 14:27:33 +0000 (15:27 +0100)
pl 13.jcn1
- bezier-bow fix

CHANGES
VERSION
flower/polynomial.cc
lily/bezier-bow.cc

diff --git a/CHANGES b/CHANGES
index b248113d9c40910447da8ab6fcc48b6df695ba19..0ad730555028069d06356102bb8d86bb83feb44d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+pl 13.jcn1
+       - bezier-bow fix
+
 pl 12.hwn1
        - polynomial.hh
        - bf: generic properties
diff --git a/VERSION b/VERSION
index bcb4087ea5ff131c38840a772ba5122d57a4725e..59b0cf7d5998db429e1018a184a68f64f65eacd9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=13
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 7fe77f2112bd80c7c831402aa23e060cee5e58c1..2fe75879f0c317485c0c694fe984507e4694e21a 100644 (file)
@@ -76,7 +76,7 @@ Polynomial::power(int exponent, const Polynomial & src)
   return  dest;
 }
 
-const Real FUDGE = 1e-8;
+static Real const FUDGE = 1e-8;
 
 void
 Polynomial::clean()
index 1610af6ec11f462f651f05352c87610023ae84d3..a029f36e661b8f3b85db7cab39ef1ad363450f93 100644 (file)
@@ -221,10 +221,14 @@ Bezier_bow::calc_return (Real begin_alpha, Real end_alpha)
   return_.control_[2] = curve_.control_[1] - thick * complex_exp (Offset (0, 90 - begin_alpha));  
 }
 
+static Real const FUDGE = 1e-8;
+
 /*
-This function calculates 2 center control points, based on 
+  This function calculates 2 center control points,
+  based on lines through c_0 --> left disturbing
+  and c_3--> right disturbing encompass points.
   
- See Documentation/fonts.tex
 See Documentation/fonts.tex
  */
 void
 Bezier_bow::calc_tangent_controls ()
@@ -275,19 +279,23 @@ Bezier_bow::calc_tangent_controls ()
   Direction d = LEFT;
   do
     {
-      maxtan[d] *= rc_correct;
-      angles[d] = atan (-d * maxtan[d]);
+      maxtan[d] *= -d * rc_correct;
+      angles[d] = atan (maxtan[d]);
     }
   while (flip(&d) != LEFT);
 
   Real rc3 = 0.0;
 
-  // if we have two disturbing points, have line through those...
-  if (disturb[LEFT][Y_AXIS] != disturb[RIGHT][Y_AXIS])
+  /* 
+    if we have two disturbing points, have line through those...
+    in order to get a sane line, make sure points are reasonably far apart
+    X distance must be reasonably(!) big (division)
+   */
+  if (abs (disturb[LEFT][X_AXIS] - disturb[RIGHT][X_AXIS]) > FUDGE)
     rc3 = (disturb[RIGHT][Y_AXIS] - disturb[LEFT][Y_AXIS]) / (disturb[RIGHT][X_AXIS] - disturb[LEFT][X_AXIS]);
 
   else
-    rc3 = tan ((angles[RIGHT] - angles[LEFT]) / 2);
+    rc3 = tan ((angles[LEFT] - angles[RIGHT]) / 2);
 
 
   // ugh: be less steep