topical media & game development

talk show tell print / MathML / S5 / source(s) / cfg / []

type (asciisvg commands and javascript):

pointer coordinates: (x,y)

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:

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)
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).


[] readme course(s) preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthought(s) appendix reference(s) example(s) resource(s) _

(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.