|
From: | Urs Liska |
Subject: | Re: What to do wanting a 4th order Bézier? |
Date: | Tue, 20 Sep 2016 00:40:47 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
Am 19.09.2016 um 22:49 schrieb Urs
Liska:
Am 19.09.2016 um 20:50 schrieb David Kastrup:Urs Liska <address@hidden> writes: [...] You are working with slopes here. Don't. They don't support vertical lines.Yes, that's what I realized ...Please take a look at the recently added functions ly:length ly:angle ly:directed They will usually make it easy to do the operations you want. In particular ly:directed can also use a vector as a direction without ever calculating its angle.Thanks! From looking at the docs it seems they'll do exactly what I want (and had partially implemented in Scheme). Can't wait to return to my LilyPond computer :-) I think I now have it in a state where we can work from. The angle of the inflection is now given as an angle relative to the line connecting the end points of the whole slur. While an angle relative to the horizontal line would be somewhat more straightforward I think this approach is more robust against changes (for example when the slur is cross-staff and the staff-staff distance changes). TODO:
The code is now at https://github.com/openlilylib/snippets/tree/compound-slur/notation-snippets/shaping-bezier-curves Best |
compound-slur-example-sorabij.pdf
Description: Adobe PDF document
[Prev in Thread] | Current Thread | [Next in Thread] |