You might want to have a look at what JSXGraph is doing, http://jsxgraph.uni-bayreuth.de/wiki/index.php/Category:Examples
If you want the curves to look smooth you probably want to either recalculate the lines depending on the current zoom-factor, or use higher level curve primitives. An example of a static "infinitely" zoomable periodic curve can be seen here: http://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObject/paths-data-02-t.html
You probably want to use a viewBox
attribute too, to define the coordinate system and to make the image truly scalable.