[OSM-dev] looking for some spline code to adapt
Rich Morin
rdm at cfcl.com
Sun Jul 2 07:47:54 UTC 2017
I'm generating sets of tactile maps for a blind friend, as follows:
OSM export files -(Ruby)-> PostScript -(lpr)-> swell paper
I'm using straight lines for the roads, using the PostScript moveto
and lineto operators. However, I'd like to use the curveto operator:
x1 y1 x2 y2 x3 y3 curveto -
This operator draws a curve from the current point to the point (x3, y3)
using points (x1, y1) and (x2, y2) as control points. The curve is a
Bézier cubic curve. In such a curve, the tangent of the curve at the
current point will be a line segment running from the current point to
(x1, y1) and the tangent at (x3, y3) is the line running from (x3, y3)
to (x2, y2).
-- http://www.tailrecursive.org/postscript/operators.html
I'm not sure what the best starting point would be for this. I found this
Perl code, but it seems a bit dated:
http://wiki.openstreetmap.org/wiki/Osmarender/BezierCurves
Clues, comments, and suggestions?
-r
--
http://www.cfcl.com/rdm Rich Morin rdm at cfcl.com
http://www.cfcl.com/rdm/resume San Bruno, CA, USA +1 650-873-7841
Software system design, development, and documentation
More information about the dev
mailing list