When I was a wee lad in 4th and 5th grade (1984/1985), we had a couple Apple II+ computers. One of the first programming experiences was with Apple Logo, a turtle graphics program that had a small language, but was still very much a 'programming' environment. Thus began my code monkey fate. My son (9 yrs old) asked me if he could learn to program... so I created this in hopes that he finds as much enjoyment as I did.
I took this a step further for myself and added the ability to define your own functions. There is a link below to export your functions. Just copy the string back in next time to rebuild your function library. I also added variables and basic operations, random number generators, IF logic conditions and LIFO stacks. It's great for self-similar fractals and L-system generation!
UPDATE: I am now using the 'canvas' tag in HTML5 for the drawing routines. The canvas tag is not supported in all browsers. I suggest using Firefox or Safari.
CL : ClearH : HomePU : Pen UpPD : Pen DownPC color : Pen Color (HTML color names, RGB hex as RGB or RRGGBB, RGBA hex as RRGGBBAA)FD value : Move Forward # pixelsBK value : Move Backward # pixelsRT value : Right Turn # degreesLT value : Left Turn # degreesSAVE : Saves current Position, Angle and Pen Color (pushes onto LIFO state stack)RESTORE : Restores saved Position, Angle and Pen Color (pops from LIFO state stack)NULL : Do Nothing (useful in logic conditions: IF Less Than = IFGTE x y [NULL][...])RP value [...] : Repeats [...] # times (can use REPEAT instead)TO name [...] : Creates a function of commands (call the name, or click on the button)SET var value : var = valueADD var value : var = var + valueSUB var value : var = var - valueMULT var value : var = var * valueDIV var value : var = var / valuePRCNT var value : var = var * value / 100PUSH value : Pushes value onto LIFO variable stackPOP : Pops value from LIFO variable stack (eg SET X POP)RAND : Random number 0-100RANDANGLE : Random number 0-359IFNZ value [...][...] : If value != 0 runs first, otherwise secondIFEQ value1 value2 [...][...] : If value1 = value2 runs first, otherwise secondIFGT value1 value2 [...][...] : If value1 > value2 runs first, otherwise secondIFGTE value1 value2 [...][...] : If value1 >= value2 runs first, otherwise second