Am 04.05.2012 08:09, schrieb James:
Hello,
On 4 May 2012 01:31, Urs Liska<lilyli...@googlemail.com> wrote:
Am 04.05.2012 02:08, schrieb David Nalesnik:
Hi Urs,
> It would be a really valuable feature if one could let LilyPond
display
> the control-points of a bezier curve.
> I would imagine something like a cross or a point at the middle two
> control-points.
I think this would be very helpful, so that you can visualize exactly what
these control-points are that you're setting. (It must be a common
misconception that they are points on the actual curve.)
I'm not sure what impact this may have on the layout, but you could do
something like the following:
\version "2.15.37"
#(define (make-cross-stencil coords)
(ly:stencil-add
(make-line-stencil 0.1 (- (car coords) 0.2) (- (cdr coords) 0.2)
(+ (car coords) 0.2) (+ (cdr coords) 0.2))
(make-line-stencil 0.1 (- (car coords) 0.2) (+ (cdr coords) 0.2)
(+ (car coords) 0.2) (- (cdr coords) 0.2))))
#(define display-control-points
(lambda (grob)
(let ((stencil (ly:slur::print grob))
(cps (ly:grob-property grob 'control-points)))
(ly:stencil-add stencil
(make-cross-stencil (second cps))
(make-cross-stencil (third cps))))))
\relative c'' {
\override Slur #'stencil = #display-control-points
c( d e f)
}
Hope you find this helpful!
Wow, extremely!
Of course I would prefer to have this built-in.
And as you I can't really judge if this has side effects.
But this really _is_ helping to find suitable values for the control-points.
* Although I know bezier curves from vector graphics software, I also
was convinced that the 'control-points' were four points on the
curve that define its shape.
* In fact the first and last are such points, whereas the middle two
'control-points' are the 'handles'.
-> Is this explained somewhere?
http://lilypond.org/doc/v2.14/Documentation/notation-big-page.html#modifying-ties-and-slurs
OK, that's a thorough explanation ...
I must have read this - but probably I didn't understand it then and
therefore forgot it more effectively than if I hadn't seen it at all ;-)
Best
Urs
?
James
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond