[Chart] Bezier smoothing
Tim Docker
tim at dockerz.net
Mon Apr 7 23:51:10 BST 2014
That makes sense - I'd still follow the steps below but add;
4) add a library function to construct a path of bezier segments given the
open/closed spline. This could either call Diagrams.CubicSpline directly,
or it might be preferable to take a copy of the algorithm, to avoid having
the chart library core depend on diagrams and all its deps.
Tim
On 8 Apr 2014 02:07, "Sacha Sokoloski" <sacha404 at gmail.com> wrote:
> So as I found out, there's a difference between being able to draw a
> bezier curve, and being able to calculate/interpolate a bezier spline.
> Diagrams exposes an algorithm for calculating the spline here:
>
> http://hackage.haskell.org/package/diagrams-lib-1.1.0.4/
> docs/Diagrams-CubicSpline.html
>
> It probably wouldn't be too hard to get it working, but for some reason
> I'm hoping someone else will do it. At some point I'll probably get around
> to implementing a solution myself, but my current work doesn't involve
> contour plots, so it's not a priority for me.
>
> On 05/04/14 01:00 PM, chart-request at projects.haskell.org wrote:
>
>> Hi.
>>
>> For this I think you would need to:
>>
>> 1) extend the abstract back end to support a bezier segment in paths
>>
>> 2) implement this in both the Cairo and diagrams renderers - with some
>> tests
>>
>> 3) make use of the bezier segments in your new contour plots.
>>
>> However - looking back to the thread where you raised this before, it
>> sounded like the Cairo beziers didnt meet your needs. Did you resolve
>> this?
>>
>
>
> _______________________________________________
> Chart mailing list
> Chart at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/chart
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/chart/attachments/20140408/1a81d5da/attachment.htm>
More information about the Chart
mailing list