Logic Anime

Photo by Hans BEck

Goal and motivation

Prolog has a declarative nature. You use it for describing structures. But how can this be combined with action and animated graphics? Starting from this question I startet this project. It is intended to find a way how to describe animations with Prolog like a story board describe a movie. Far less important would be the goal to write another animation tool. There are plenty of goods ones.

The workflow should be like this: write a scene as a text, send this text to the render tool. This renders the animation and builds from this a movie, which the user now can integrate into its PowerPoint presentation.

The idea popped in my mind when I created a presentation which should explain something. It would be nice - so my thought - if I clould quickly create a small animation like these which every commercial today throws onto our eyes.

There are some interesting theoretics goodies, which I want to look at in a special blog post.

Initial decisions

Of course Prolog is the main thing. The component taking the script is therefore Prolog. In the first step Rendering will be the task of Processing. This I have already used and it seems to be more easyliy than Unity or Unreal.

The diagram “Use Cases” visualize what the User will do:

Use Cases

The processing chain will require only a few elements:


Big questions

The main question is how a scene describtion could look like such that Processing can handle and render it. This could be a Processing programm or it could be a variant of a scene graph interpreted by Processing. In general I like the meta program approach. Programs which generate programs. Think about advanced examples from LISP and Prolog applications, it is not special. Following this way would require Prolog to tanslate the declarative description to the object oriented world of Processing rendering code.

As alternative, using a scene graph would be fit perfectly to the declarative nature of Prolog. In this case Processing has to perform the necessary translation declarative to dynamic and objects. Which way would be better can only be evaluated by trying it out.


Der Sourcecode will be here in GitHub available. Requirements and user stories as well as more informationen werden will be collected in the “RQ” directory. Implementation will be done in SWI-Prolog and Processing. Processing can only produce QuickTime movies which may require to take an additional tool for producing mp4 or other formats.

Everything runs first on a desktop and exchange information in ASCII format:

Use Cases


  1. Step: Animationen with fixed shapes, translation and collision detection
Hans Nikolaus Beck
Hans Nikolaus Beck
Dipl.-Ing. Elektrotechnik

Experimental philosopher working with story telling and games