Download:

I've been adding to the program mentioned
in a previous post. The circuit simulator and origami crease pattern editor are drivable from the lisp repl, and the verlet physics based paper simulator has been implemented and is manipulated from the repl.
Also, the repl itself features command history.
Here is the list of functions currently available from the repl:
ORIGAMI CREASE EDITORorigami-startInitialises origami crease editor with a plain sheet of paper consisting of 1 four sided facet.
origami-endClears the origami crease editor.
origami-creasecoordsTakes 4 parameters (x1 y1 x2 y2) representing the 2 endpoints of a crease line.
origami-creaseTakes 2 vertex ids (nodeA nodeB) and uses them as the 2 endpoints of a crease line.
origami-creaseppTakes 2 vertex ids (nodeA nodeB) and forms the crease from "folding" one vertex on the other. The crease line is the perpendicular bisector.
origami-creasellTakes 4 vertex ids (l1v1 l1v2 l2v1 l2v2) to describe the endpoints of 2 lines, and forms the crease from "folding" one line onto the other.
origami-foldTakes 3 vertex ids (nodeF nodeA nodeB) and attempts to fold nodeF around the (nodeA nodeB) line by finding its mirror on the other side. It does the same with connected vertices as necessary.
origami-makeverletpaperMakes a verlet physics representation of the current crease pattern, so it can be manipulated in the verlet physics environment.
VERLET PHYSICSverlet-lockTakes 1 vertex id, and fixes that node in space.
verlet-freeTakes 1 vertex id, and frees that node if it was fixed.
verlet-freeallRemoves all position constraints
verlet-rotateTakes 4 parameters (nodeF nodeA nodeB angle) and rotates nodeF around the axis defined by nodeA and nodeB using the angle parameter. As the system resolves this attempt to do this rotation, you'll see whether the system currently permits or rejects such a motion.
verlet-numnodesReturns the number of nodes.
verlet-numstrutsReturns the number of struts.
verlet-showNot implemented - will show the given node id.
verlet-hideNot implemented - will hide the given node id.
verlet-showallNot implemented - will show all node ids.
verlet-hideallNot implemented - will hide all node ids.
verlet-addfstrutNot implemented - will add a folding strut, which is the same as the crease struts, but is marked as a folding strut, because it can be removed when a given fold is completed.
verlet-addsstrutNot implemented - will add a structural strut manually. For facets containing more than 3 edges, structural struts are necessary to keep those facets flat. For the crane model, all facets are triangular, so this isn't necessary yet.
verlet-removefstrutsNot implemented - will remove all folding struts.
verlet-removesstrutsNot implemented - will remove all structural struts.
verlet-autoaddsstrutsNot implemented - will automatically add structural struts where needed for facets containing more than 3 edges.
verlet-satisfyNot implemented - will allow the user to manually invoke the verlet constraint resolver, rather than having it run all the time.
CIRCUIT SIMULATORcircuit-AddNodeTakes 2 parameters (x y) and adds a new node at that location.
circuit-AddResistorTakes 3 parameters (nodeA nodeB resistance) and creates a resistor connecting nodeA and nodeB using the resistance parameter.
circuit-AddVoltageTakes 3 parameters (nodeA nodeB voltage) and creates a voltage source connecting nodeA and nodeB using the voltage parameter.
circuit-AddCurrentTakes 3 parameters (nodeA nodeB voltage) and creates a current source connecting nodeA and nodeB using the current parameter.
circuit-SetTweenATakes 3 parameters (component x y) and adds a tween vertex on one side of the component. For circuit rendering purposes.
circuit-SetTweenBTakes 3 parameters (component x y) and adds a tween vertex on one side of the component. For circuit rendering purposes.
circuit-DoLoopsAutomatically finds the loops in the circuit. It is necessary to call this once modifications to the circuit are complete for the circuit to be simulated correctly.
circuit-ClearClears the current circuit.
circuit-ShowCurrentTurns on the animated rendering of the current.
circuit-ShowComponentsTurns on rendering of the components.
circuit-ShowNodesTurns on rendering of the nodes.
circuit-ShowLoopsTurns on rendering of the loops.
circuit-HideCurrentTurns off the animated rendering of the current.
circuit-HideComponentsTurns off rendering of the components.
circuit-HideNodesTurns off rendering of the nodes.
circuit-HideLoopsTurns off rendering of the loops.
circuit-RewireTakes 3 parameters (componentID nodeFrom nodeTo) and disconnects the component from nodeFrom and connects it to nodeTo.
circuit-DeleteComponentTakes a componentID as a parameter and deletes it.
circuit-DeleteNodeTakes a nodeID as a parameters and deletes it if there is nothing connected to it.
LIVE RENDERINGogl-renderonTurn on live rendering
ogl-renderoffTurn off live rendering
ogl-drawlineTakes 6 parameters (x1 y1 z1 x2 y2 z2) that describe a 3D line, and renders it. This can only be called from within the paper-render function. Redefine the paper-render function at will at runtime.
OLD TEST FUNCTIONSmyaddTakes 2 parameters and adds them
myaddlistTakes a list and adds the numbers in the list.
Screenshots:Press "Execute" when the program starts to load the script which computes the crane crease pattern:

Having a look at the crease pattern in the pattern editor:
Verlet physics paper manipulation and live rendering: Calling verlet-rotate from the repl to rotate the 4 corner vertices at once, 0.1 degrees at a time (the rotation continues due to momentum), then calling ogl-renderon to turn on live rendering, and modifying the paper-render function live by loading live-render.lisp (the function simul-rotate has been defined for convenience to do the simultaneous rotation):
Circuit simulator: Switching to the circuit simulator and loading a circuit (block-circuit.lisp):

Loading the scripts "block-circuit2.lisp" and "block-circuit3.lisp" to modify the circuit: