Hi,
I think the attached patch implements a slight simplification of convolution of areas with regions: since segments within bezier curves are by construction connected (p3 of one segment is p0 of the next), the convolution was including duplicates from the region at successive endpoints.
The gsharp :quarter-rest becomes a union of 32 bezier areas with this patch (down from 47), and doesn't look noticeably different to me, either with the X or the html canvas output methods; the canvas output is overall smaller by 20%, just from this change.
I believe that there are still duplicate regions in the quarter rest, but if this change could be reviewed I'd be happy.
Cheers,
Christophe
Christophe Rhodes csr21@cantab.net writes:
the canvas output is overall smaller by 20%, just from this change.
(that is measured using gsharp's rapsoden-sjunger.gsh score)
I believe that there are still duplicate regions in the quarter rest, but if this change could be reviewed I'd be happy.
There are indeed some more duplicates, arising from split points returned from FIND-SPLIT-POINTS differing by one part in 10^8 or so:
1: CLIM-INTERNALS::FIND-SPLIT-POINTS returned (0.03709000980332888d0 0.16700945980421777d0 0.167009459804218d0 0.3339371876264945d0 0.6123851602108852d0 0.8777177045678732d0 0.8777177045678737d0)
1: CLIM-INTERNALS::FIND-SPLIT-POINTS returned (0.20963359401083448d0 0.2096335983836628d0 0.6517729758960513d0 0.6517729766787337d0)
maybe these should be tested for equality in the remove-duplicates call in find-split-points using an epsilon of some magnitude? Removing these four effective duplicates would reduce the quarter rest design to a union of 24 areas.
Cheers,
Christophe
Christophe Rhodes writes:
but if this change could be reviewed I'd be happy.
Looks good to me.