This project is an attempt to reproduce some Lissajous curves drawn by an harmonograph.
Lissajous curves are drawings of parametric equations which are intimately related to harmony, and therefore with music or even planetary patterns, given proper perspective. The following animation depicts a low-fidelity capture of the application in execution.
The decision to build this small experiment came from a friend of mine, as she showed me a certain GIF animation with certain parametric behaviour. As soon as I saw the animation, having recently read Quadrivium, I immediately spotted the resemblance to Lissajous curves, which encouraged me to build a simulation of many harmonographs running under certain intervals.
This application was built in Common Lisp, and uses OpenGL and GLFW3 for rendering and context/window creation.
Below is the GIF animation my friend showed me, which inspired this project.
Installation and Usage
Make sure you have Quicklisp installed. Clone, copy this repository, or create a
symlink on your
local-projects directory. Then, load the system and run the
(ql:quickload :harmonograph) (harmonograph:run-app)
Close the window or press
ESC anytime to quit the application.
Note on performance and requirements
This application was designed to run using OpenGL 2.x, with fixed pipeline. Trailing effect was created using the accumulation buffer, which impacts performance. This should not be a problem when running such a simple application, but it may cause problems on higher resolutions.
It is possible to compile this application into a standalone executable. To do
that, you will need SBCL, buildapp,
make and Quicklisp. This should produce a
13M binary (notice that it may also need GLFW3 libraries).
All you need to do is run…
…on the project root directory. This should create a
bin folder containing the
There is also a
folders target to create the binary folder, and a
which deletes the built binary.
This approach also provides a way to run the application without putting it on
local-projects folder. However, you will still need the dependencies
Roswell comes with its own Quicklisp instance bundled. In that case, instead of
looking for systems on
~/quicklisp/dists, you may want to provide Roswell’s own
systems path by running the following:
Or you might want to provide your own dists path.
This projects is distributed under a 2-clause BSD License. See LICENSE for details.
Copyright (c) 2019 Lucas Vieira