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) |
|
setBorder(pixelvalue) (default 25) | |
initPicture( xmin, xmax {, ymin {, ymax}} ) | axes( {dx, dy,} {"labels" {, "grid"| gdx {, gdy}}} ) |
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) and any
of the following:
+, -, *, /, ^, pi, e, sqrt(), ln(), abs(), sign(), floor(), ceil(),
n!, C(n,k), ran(a,b,n),
sin(), cos(), tan(), sin^-1(), cos^-1(), tan^-1(),
sinh(), cosh(), tanh(), sinh^-1(), cosh^-1(), tanh^-1(),
sech(), csch(), coth(), sech^-1(), csch^-1(), coth^-1().
cpi and ctheta denote the corresponding greek letters.
The multiplication symbol * can be omitted after a digit (0-9)
or a closing parenthesis.
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).