Home           About           Downloads





QtCSG - Constructive Solid Geometry scripted from ECL







This project is the same as the earlier project, QtImagine except this also features an implementation of "Constructive Solid Geometry" operations that can be performed on 3D models such as difference, union and intersection. The algorithm for performing these operations comes from the UnBBoolean (http://unbboolean.sourceforge.net/) Java CSG implementation.



See the files csg-test.lisp, csg-test2.lisp and csg-test3.lisp for examples on how to use these features. To run them, note that they need to be loaded in order - first csg-test.lisp, then csg-test2.lisp, then finally csg-test3.lisp, since they reference objects that were created by earlier scripts.

Similarly, see init.lisp and live-render.lisp for a live rendering example script.


QtImagine - a skeleton project for live coding using ECL

QtImagine has been updated!

In the process of releasing QtLuaImagine, I cleaned up the code for QtImagine. All lisp code is now run through a (handler-bind) block so that error messages can be captured. What this means is that error messages are displayed in the main window, so no more need to flip between the console and the main window when an error occurs. Also, grey streams have been used to redirect trace output to the main window as well.






This project demonstrates the use of ECL in a Qt project to enable a 3D "live coding" environment.

The system calls the lisp functions (update) and (render) to update and render the frame respectively. These functions can be redefined at runtime at the REPL.

When QtImagine first starts, click the "Execute" button to load an example lisp source file containing example definitions of (update) and (render) which will produce a simple animation. Then, load the source file into your favourite text editor, make some changes, then load your freshly edited source file from the REPL by issuing the load command (load "live-render.lisp") to see the effect of your change instantly. Of course, you can also enter expressions and definitions at the REPL itself. The REPL features a command history.