Kelsey KurzejaPh.D. Computer science (Graphics / Geometric modeling) |
|
ShapeScript
Controls
- Drag mouse to pan camera
- Scroll to zoom in and out
- Press 's' to step by one instruction
- Press 'p' to pause/play the instructions at a rate of one per frame
- Press '1' to load the Peg Solitaire example
- Press '2' to load the 10x10 grid example
- Press '3' to load the Random grid pattern example
- Press '4' to load the Loop from 10 to 0 example
Description
The above app is an interpreter of the ShapeScript visual programming language. The values and primitive objects of ShapeScript are shapes instead of numbers. The "arithmetic" of ShapeScript is the Find and Replace operations of shape grammar. This interpreter runs on a stack-based virtual machine, and the canvas on the left shows the shape on the top of the value stack. The pane on the right shows the construction call stack. Each table in the pane represents an active construction and displays the instructions that make up the construction, with the active instruction highlighted in cyan. Red instructions represent inputs to the construction and green instructions represent outputs.
Although ShapeScript is intended to be a visual programming language, this is only an interpreter of ShapeScript programs. A visual editor of ShapeScript programs does not yet exist, and these ShapeScript programs are hardcoded into the interpreter.
The default program creates a random, valid board for the game Peg Solitaire. Black squares represent empty holes and green squares represent holes with pegs.
Back to projects