Bug 136581 - export polynoms as bézier curves in SVG
Summary: export polynoms as bézier curves in SVG
Status: RESOLVED FIXED
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Klaus-Dieter M
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-31 20:15 UTC by Tobias G. Pfeiffer
Modified: 2007-01-12 21:09 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias G. Pfeiffer 2006-10-31 20:15:39 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

It is cool that you can export a function plot into a vector graphics format such as SVG. Now if you zoom deeply into such an exported file with some SVG viewer, you see that the function graph is actually composed of many, many little lines. This not only reduces the precision of the plot, but also bloats up the file size a lot.

What I am asking for is to export polynomial functions (i.e. ones of the form \sum_{i=0}^n \lambda_i * x^i) as Bézier primitives. By that, you
a) don't lose precision if you make the Bézier curve of the same degree as the polynomial function
b) save a lot of space, since you only need (n+1) control points for a polynomial of degree n
c) make rendering probably a lot faster for the SVG application

This probably only works perfectly for polynomials, but I can imagine that an approximative approach combined with drawing a Bézier curve would be cool for a lot of other functions, too.
Comment 1 David Saxton 2007-01-12 21:09:13 UTC
KmPlot in trunk (for KDE 4.0) now uses the minimum line length to reproduce the curve - for example, if you plot "y = x" and export it as an SVG, it will be composed of a single line. This is probably faster to render than Bezier curves (KmPlot has done most of the calculation of where to place the pixels).

Exporting as Bezier curves sounds fun (and should give a smaller file size for most functions), but what KmPlot should now be sufficient. So I'm closing this bug report (feel free to reply though if you think that the minimum-line-length method above isn't sufficient ;-) ).