[Chart] Bezier smoothing

Sacha Sokoloski sacha404 at gmail.com
Mon Apr 7 17:07:08 BST 2014


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?




More information about the Chart mailing list