Re: Any more bugs/typos?

*Vladimir Nikishkin*17 Sep 2020 07:08 UTCI can only respond with a quote from the ImageMagick manual: "It is not recommended that you use more or less than 4 points per 'bezier' curve segment, to keep things simple." On Thu, 17 Sep 2020 at 15:00, Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote: > > A Bézier curve is defined through its control *points*. Don't call > them vectors, please. The canvas is an affine space (with a Euclidean > metric), not a vector space. > > Two points shall yield a linear curve, which is perfectly valid. > Three points shall yield a quadratic curve. > Four points shall yield a cubic curve. > > I don't understand why the N >= 5 point case is discouraged? There is > a well-defined notion of a Bézier curve of degree N - 1. > > Marc > > Am Do., 17. Sept. 2020 um 08:04 Uhr schrieb Vladimir Nikishkin > <xxxxxx@gmail.com>: > > > > >which it isn't--(draw-bezier vec1 vec2) is a valid call) > > > > It is required, or at least I meant it to be required. For simple > > straight lines, (draw-line) is a reasonable choice. > > I think Bezier curves can be reduced to straight lines in the > > two-point case, but I am not exactly sure of the math. > > So at least three points, two knots and a control point are required. > > Moreover, adding additional points (as in 5 arguments) does not turn a > > cubic Bezier into a quartic Bezier in the sample implementation, but > > does some evil image-magick trickery (ImageMagick explicitly warns > > against using 5 points). > > > > >(draw-bezier vec1 vecI ... vecN) > > > > I wanted to use an ellipsis, but ellipsis seems to have some special > > meaning in Scheme (at least in the macro definitions), which I am not > > as familiar as I should be. If it is fine, I will replace the bracket > > notation with the ellipsis. > > The brackets I took from man pages, where it usually denotes > > "optional", and the asterisk means "0 or more times" almost > > everywhere. > > > > On Thu, 17 Sep 2020 at 13:49, Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> wrote: > > > > > > On 2020-09-17 12:00 +0800, Vladimir Nikishkin wrote: > > > > Is it fine to use the [vecI]* notation, or there is a more common one in Scheme? > > > > > > The [vecI]* notation is unfamiliar to me. Is it used in other SRFIs, > > > or elsewhere? > > > > > > The new version, > > > > > > (draw-bezier vec1 vec2 [vecI]* vecN), > > > > > > seems a little misleading, since vecN appears to be required (which it > > > isn't--(draw-bezier vec1 vec2) is a valid call). If the double-bracket > > > version mentioned earlier seems ugly, I recommend: > > > > > > (draw-bezier vec1 vecI ... vecN) > > > > > > -- > > > Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz> > > > > > > "A LISP programmer knows the value of everything, but the cost > > > of nothing." --Alan J. Perlis > > > > > > > > -- > > Yours sincerely, Vladimir Nikishkin -- Yours sincerely, Vladimir Nikishkin