PyMotion - selene tan
selene tan

PyMotion

by on Dec.09, 2005, under Blog, Video and Animation

PyMotion is a framework for creating visual music based on John Whitney’s principle of “differential motion”. In differential motion, a set of identical elements moves along the same path with different speeds. If the first element moves at speed x, then the second element will move at speed 2x, the third at 3x, and so on. The result is motion with patterns that appear and dissolve at regular intervals.

For PyMotion, I used Python and PyGame, the Python port of the SDL library. I wrote the program in Leo, a literate programming editor that uses trees to structure code.

The framework of PyMotion is contained in the variable-speed ticker, and in the element-handling functions. The variable-speed ticker allows one to implement global accelerations and decelerations independent of framerate. The element-handling functions consist of functions to create arrays of elements in various configurations, and functions to move arrays of elements according to various rules.

Starting Configurations:

  1. Dot
  2. Line
  3. Circle

Motion Rules:

  1. Straight line
  2. Along the perimeter of a circle
  3. Radially inward or outward while moving in a circle
  4. Sinusoidal oscillation
  5. Polar-coordinate rose motion, as described in John Whitney’s book, Digital Harmony

I used the framework to create one piece of visual music. I have not included screenshots because the heart of differential motion is motion, and screenshots do not adequately capture it. To view the piece on a Windows machine, download the zip file below, unzip it, and run pymotion.exe. To view the piece on any other machine, you will first need to install Python and PyGame. Then download the zip file, navigate to the /python/source directory, and enter python pymotion.py to run it.

Download PyMotion

:, , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!