| Home | Commands | ASCIIsvg Editor 1.0 | Gallery | Download | FAQ | Comments | ASCIIMathML |

Type (or paste) your ASCIIsvg commands into the textarea. Then click the update button to see the picture. To save your work, select the text (Ctrl-A) and copy it to a text editor (e.g. Notepad). Choose the layout that best fits your screensize:

Type (ASCIIsvg commands and JavaScript)Display  (Requires IE+SVGviewer 3.01 or Mozilla+SVG)
Note that this is dynamic HTML running locally on your machine! If you leave this page before copying and saving your work, it may disappear.

ASCIIsvg commands (click link for details; arguments in {} are optional)
initPicture( xmin, xmax {, ymin {, ymax}} )     border = "pixelvalue" (default 25)
grid( {dx, dy} ) axes( {dx, dy, {"labels"}} )
line( [x,y], [u,v] ) marker = "dot" | "arrow" | "arrowdot" | "none"
path( [ [x1,y1], [x2,y2], ..., [xn,yn] ] ) curve( [ [x1,y1], [x2,y2], ..., [xn,yn] ] )
plot( "f(x)" {, xmin, xmax, npoints} ) plot( [ "f(t)", "g(t)" ] {, tmin, tmax, npoints} )
stroke = "color" strokewidth = "pixelvalue" (default 1)
fill = "color" strokedasharray = "dashpixel spacepixel"
fontsize = "pixel" (default 20) fontweight = "bold" | "normal"
fontstyle = "italic" | "normal" fontfamily = "serif"|"sansserif"|"fixed"|"monotype"
circle( [x,y], r ) ellipse( [x,y], rx, ry )
arc( [x,y], [u,v], r ) rect( [x,y], [u,v] )
text( [x,y], "label" {, position} ) dot( [x,y] {, "open"|"closed" {, "label", position} )
position can be: above, below, left, right, aboveleft, aboveright, belowleft, belowright, null

For the plot commmand, the functions f(x), f(t), g(t) can use any valid JavaScript function or constant (without the "Math." prefix): PI, E, +, -, *, /, sqrt, sin, cos, tan, asin, acos, atan, abs, exp, log (=ln), floor, ceil, ... (pi, e, x^y, ln, arcsin, arccos, arctan, sec, csc, cot are defined as well, and cpi, ctheta denote the respective greek letters).

This Editor is useful for learning about coordinate geometry, graphs of functions, parametric curves, JavaScript, SVG, ... Have fun.

You can save your own local copy of this page (using Save As...), and use this SVG editor even when you are not connected to the internet. You can also right-click on the SVG picture to copy it and paste it into a wordprocessor that can handle SVG (e.g. in MSWord 2003 use Edit->Paste Special... and select the bitmap format; your picture will be inserted as SVG).


Peter Jipsen, Chapman University, Nov 2004