[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: True Hand-engraved Dashed Slurs

From: tisimst
Subject: Re: True Hand-engraved Dashed Slurs
Date: Wed, 28 Jun 2017 11:26:45 -0700 (MST)

On Wed, Jun 28, 2017 at 8:14 AM, Carl Sorensen-3 [via Lilypond] <
address@hidden> wrote:

> On 6/27/17 9:00 PM, "lilypond-devel on behalf of Carl Sorensen"
> <lilypond-devel-bounces+c_sorensen=[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=204180&i=0> on behalf of
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=204180&i=1>>
> wrote:
> >>
> >>Thoughts? You may be tempted to think that I'm being too nit-picky and
> >>maybe I am, but I think the PS dashed curve looks better due to its
> >>consistency. I've attached a PDF that shows all three kinds of dashed
> >>slurs, the current default, the better one using Slur Overrides, and the
> >>ideal one with PS code.
> I can see that the uniform dashing is better.  I am not in favor of moving
> to the PS code for LilyPond, however, because we have more backends than
> just PS (in particular, we have SVG).

Agreed. Hence, my bringing this up.

> >The slur made with your slur overrides is clearly defective. I'm not sure
> >why. I will investigate.
> >
> >If you go to high magnification you will see that some dash ends are
> >concave and some are convex.  That should never happen.
> I could not replicate the problem your pdf had with broken segments.  I
> don't know if it was just a case of my viewer, or not.
> But the issue of non-uniform t along the length of the bezier curve is a
> legitimate issue.  I am looking into it to see if there are any readily
> available solutions.

Well, t is numerically uniform. It's the transformation from t to x and y
coordinates that makes the segments non-uniform in length. It's not all
that complicated to estimate t-values that provide more equally sized
segments, it's just more calculations. The most basic algorithm is the

1. Discretize the curve into N equal time segments (say 100).
2. Approximate the length of each real curve segment as if it were linear
from one time position to the next.
3. Now, given the desired segment dash length (which may be calculated
based on dash-fraction and dash-period), add up segments (or use linear
interpolation) until you've gone far enough along time and note the
t-values for that segment.
4. Repeat (or just continue from the last stopping point) for each segment
to get all the t-values that provide more-or-less geometrically equidistant
points along the curve.

There are numerous ways of optimizing this "walk" along the curve, but I
think you get the idea. The economics of this algorithm would need to be
vetted, but calculating the t-values for a single curve is quite fast.

> This is an example of something that one would hope to benefit from if
> LilyPond were to go to Cairo.

Like David, I'm not sure that using or not using Cairo is relevant for
general use (i.e., for both tapered and monolinear dashed curves).


View this message in context:
Sent from the Dev mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]