webMathematica >

SVG

SVG is a language for describing two-dimensional graphics in XML. Like MathML it is an official recommendation of the W3C, http://www.w3.org/Graphics/SVG/. It provides a number of benefits for users of webMathematica. First, since it is a vector-based format the results often have a higher quality than is typically the case with image formats. This is very much the case when considering print output. Secondly, for many types of image, the actual file size is often quite small especially compared with image formats. Thirdly, it supports a number of dynamic and interactive features. Mathematica can generate SVG from graphics and this section will give some examples of web usage involving SVG. One thing to be noted is that any examples will require that your browser supports SVG. Ways to do this include the use of the Amaya browser, http://www.w3.org/Amaya/, which provides native support, or the Adobe plug-in, http://www.adobe.com/svg.

Plotting with SVG

This is very similar to the basic example Plot.jsp. The differences between the two are the loading of the SVG support package and the use of the SVG plotting function SVGShow. If this works correctly, you may wish to use some of the features that the Adobe plug-in provides.

SVG Animations

<msp:evaluate>
MSPBlock[ {$$eqn, $$t0, $$init1, $$init2, $$t1},
svg = NDSolveToSVG[ $$eqn, {$$init1, $$init2}, {$$t0,$$t1}] ;
SVGDisplay[ svg, {400, 300}]]
</msp:evaluate>