https://codereview.appspot.com/270640043/diff/40001/scm/stencil.scm File scm/stencil.scm (right):
https://codereview.appspot.com/270640043/diff/40001/scm/stencil.scm#newcode73 scm/stencil.scm:73: (width (- (car stop) (car start))) I'd not use `width' (and `height') here but `dx' and `dy': the expectation for variable names `width' and `height' is that they will generally be non-negative. https://codereview.appspot.com/270640043/diff/40001/scm/stencil.scm#newcode81 scm/stencil.scm:81: ;;;; beginning '(0 . 0), ending at (cons length-to-print 0) Ah, here's the rub. Why end at (length-to-print . 0) instead of (1 . 0)? Scaling by length at the start instead of after you are done makes things unnecessarily complex and indeed requires Pythagoras. If you instead work with a "unit" bow, scaling and rotating the resulting points to match some actual line does not require calculating the line length but just the equivalent of a complex multiplication in cartesian coordinates. https://codereview.appspot.com/270640043/diff/40001/scm/stencil.scm#newcode123 scm/stencil.scm:123: length-to-print) See? You've effectively multiplied everything with length-to-print at the start, just to divide by it again here. Total waste of effort. https://codereview.appspot.com/270640043/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel