Thanks Silvain,
As I mentioned previously on the list my background is maths and I
understand Beziers, and I have implemented very compact code to do this.
I appreciate your help in any case. Actaully, the main basis for the
original post was to query what approach Lilypond takes.
I also giv
You can draw a quasi perfect circle with a Bezier curve (cubic) with 4 main
points.
The optimal distance between main and secondary control points is
0.5517847391957151 * radius
(you do not need as many decimal places...!)
(optimal value calculated with wxMaxima and checked with Inkscape)
Le
Werner LEMBERG writes:
>>> Well, Metafont uses a third-order Bézier approximation to build up
>>> circles (from four quarter circles). However, the Metafont book
>>> says that the difference to a real circle is less than 0.06%, which
>>> is thus imperceptible.
>>>
>>> The same holds for PostScri
>> Well, Metafont uses a third-order Bézier approximation to build up
>> circles (from four quarter circles). However, the Metafont book
>> says that the difference to a real circle is less than 0.06%, which
>> is thus imperceptible.
>>
>> The same holds for PostScript-based fonts.
>
> PostScrip
Werner LEMBERG writes:
>>> There's a lot of oldish webpages with complex Bezier curve
>>> constructions for circles.
>>
>> Those must be approximate constructions. It is not mathematically
>> possible to construct a Bézier curve which is at the same time an
>> exact circle.
>
> Well, Metafont us
There are a whole lot of custom noteheads I need that are based on
circles with all sorts of additions like dots and things for a
contemporary modernist work. Very special case, but they may end up
being useful for others when I finish. I'll see if draw-circle can fit
into the scheme of things
> Le 11 août 2022 à 09:38, Andrew Bernard a écrit :
>
> All my other custom noteheads use curveto heavily. I was wondering if I could
> scrimp time by using an arc command. I'm trying to avoid raw postscript as I
> think that obviates the ability to output SVG - not that I use it but others
All my other custom noteheads use curveto heavily. I was wondering if I
could scrimp time by using an arc command. I'm trying to avoid raw
postscript as I think that obviates the ability to output SVG - not that
I use it but others do,
Thanks all!
Andrew
On 11/08/2022 5:16 pm, Jean Abou Sam
> Le 11 août 2022 à 09:06, Andrew Bernard a écrit :
>
> As to the _real_ question (XY? ;-) ), I am needing to do custom circular
> noteheads, also with bits and bobs such as middle dots and so on and I was
> not able to find an arc operator in the markup path commands, so one needs to
> us
As to the _real_ question (XY? ;-) ), I am needing to do custom circular
noteheads, also with bits and bobs such as middle dots and so on and I
was not able to find an arc operator in the markup path commands, so one
needs to user curveto, which is a Bezier operator. Is that right?
Andrew
Thanks all,
Comments much appreciated, but I know all that, as my background is
maths. I was just wanting to see how Lilypond does it.
And of course after I posted about oldish pages I recall of course that
you have to do circles with Beziers in fonts, as the arc operator is not
available. T
Both Postscript and SVG have a built-in arc function capable of drawing an arc (or an
entire circle).
Bézier 2-D curves can approximate a circle, but cannot create a mathematical exact circle
(although an approximation using 4 points is so precise that it is practically
indistinguishable from
>> There's a lot of oldish webpages with complex Bezier curve
>> constructions for circles.
>
> Those must be approximate constructions. It is not mathematically
> possible to construct a Bézier curve which is at the same time an
> exact circle.
Well, Metafont uses a third-order Bézier approximat
Le 11/08/2022 à 06:14, Andrew Bernard a écrit :
Ah yes it is in the postscript area of the source code.
/draw_circle % filled? radius thickness draw_circle
{
setlinewidth % f? r
currentpoint % f? r x0 y0
3 2 roll % f? x0 y0 r
dup 0 rmoveto
Ah yes it is in the postscript area of the source code.
/draw_circle % filled? radius thickness draw_circle
{
setlinewidth % f? r
currentpoint % f? r x0 y0
3 2 roll % f? x0 y0 r
dup 0 rmoveto
0 360 arc closepath
stroke_and_fill?
} bind
Well I suppose it is actually postscript. So I had better look at the
full source?
On 11/08/2022 11:40 am, Andrew Bernard wrote:
Where is the code that actually draws a circle stencil? I am
interested to see if it is done with Bezier curve techniques and to
study that. I could not seem to find
You're welcome Paul.
Cheers,
Pierre
PS. Be sure to respond to the list.
Le jeu. 2 juil. 2020 à 14:31, Paul McKay a écrit :
> Thanks for this Pierre. I can now do just what I'd hoped. I'm still
> struggling to write the appropriate markup function, but I'll keep going!
> Paul
>
> On Wed, 24 Jun 2
Hi Paul,
How about:
\version "2.20.0"
customFingering = {
\override Fingering.font-name = "Arial Black"
\override Fingering.font-size = #-1
\override Fingering.color = #(x11-color "DarkRed")
}
cust =
-\tweak font-name #"Arial Black"
-\tweak font-size #-2
-\tweak color #(x11-color "Da
18 matches
Mail list logo