This project includes a few packages to add on to Zoomscript. Try running the sample program. PEN PACKAGE: Procedures: canvasinit - creates a 200x200 canvas. (0,0) center. pendown, penup - control if pen writes pengoto x y - teleport the pen object pentravel x y secs - move the pen object over time penhue hue - change hue of the pen pencolor hue sat lum - more color changing options pensize size - change size of pen line x1 y1 x2 y2 - draw line across two coordinates circle rad deg - draw a circle w/ specified radius poly rad vert - draw a reg. polygon w/ radius & vert ct. rect x1 y1 x2 y2 - draw rectangle across 2 coords. canvasclear - clear the canvas OPERATORS PACKAGE: Functions: add, sud, mul, div a b - applied the corresponding operator to a & b (e.g. "num & add 1 3" will return 4 as the value of num) TRANSLATION PACKAGE: Functions: translate string lang - translates a string into specified language getlang - gets the current language used MUSIC PACKAGE: Procedures: note pitch length inst - play a note w/ pitch, length, instrument drum type length - play a drum for a certain time rest length - rest for x many beats tempo beat - set the tempo
If you do not know how to program in this language, please see the original project. SAMPLE PROGRAM: ¶0¶print "what shape do i draw?"¶0¶println¶0¶print "lowercase only"¶0¶println¶0¶var shape¶0¶shape & get¶0¶if eq shape "square"¶1¶canvasinit¶1¶penhide¶1¶rect -40 -40 40 40¶0¶endif¶0¶if eq shape "triangle"¶1¶canvasinit¶1¶penhide¶1¶poly 40 3¶0¶endif¶0¶if eq shape "circle"¶1¶canvasinit¶1¶penhide¶1¶cvvvvvvvvvvcircle 40¶0¶endif¶0¶if eq shape "rectangle"¶1¶canvasinit¶1¶penhide¶1¶rect -60 -40 60 40¶0¶endif¶0¶if eq shape "pentagon"¶1¶canvasinit¶1¶penhide¶1¶poly 40 5¶0¶endif¶0¶if eq shape "hexagon"¶1¶canvasinit¶1¶penhide¶1¶poly 40 6¶0¶endif¶0¶if eq shape "octagon"¶1¶canvasinit¶1¶penhide¶1¶poly 40 8¶0¶endif¶0¶note 60 0.15 1¶0¶note 72 0.15 1¶0¶print "enter a language"¶0¶println¶0¶print "lowercase only"¶0¶println¶0¶var lang¶0¶lang & get¶0¶var final¶0¶final & translate shape lang¶0¶print (shape," in ",lang," is ",final)¶0¶note 62 0.15 1¶0¶note 74 0.15 1 Go to the menu, choose "Import Program", and paste this in. Programming language and original documentation by