Scott Snibbe, Tripolar

December, 2002

The nearly 300 lines of code in Snibbe’s piece might overwhelm a viewer. Again the applet’s java is color-coded, but in this case, the colors mimic what one would expect to see in a good editor. This is the programmer’s view, color-coded according to the syntax of java itself. And the hints contained are also of a form that one would expect to find in normal practice. All programming languages have a syntax for comments which delineate text that will not be executed. Well-commented code, such as Snibbes, is considered good practice because, even to another programmer, or the author at a later date, the idiosyncrasies of coding, and its opacity, make reading it difficult.[12] Snibbe’s introductory block of comments is extensive–perhaps because of the intended art audience–but it is not out of line with what one could expect to find as a matter of course. He reveals the subject and logic of his code: that it is a simulation of a classic problem in chaos theory, a metal pendulum released over a set of magnets; that its effects depend on the “meta-chaos” of a set of variables he has fixed in the code; and that there is a mechanism for interpolating between pixels to show the details of the chaotic system.

Tripolar, Scott Snibbe

Snibbe’s code makes use of the object-oriented structure of java more extensively than Wattenberg’s. He develops a complete set of methods and properties for the Tripolar class. Some handle the mouse movements and some create the elements of the simulation. “UpdatePaths” is the function that controls the simulation itself:


   // performs the simulation of the pendulum and draws the path
   void updatePaths(double x, double y, Graphics g) {
      double vX=0, vY=0;   // velocity
      double fX,fY;
      double r, over_rsq, over_rcube;
      double dx, dy;
      double filtVel = 1;
      double lastX, lastY;
      int iter = 0;

      g.setColor(Color.black);
      while (filtVel > 0.1 && iter < 10000) {
         iter++;
         fX=0;
         fY=0; // zero forces

         // simulate gravitational pull towards center
         r = x*x + y*y;
         if (r < 0.00001)
            r= 0.00001;

         over_rsq = 1.0 / r;
         fX -= (x * gravity_) * over_rsq;
         fY -= (y * gravity_) * over_rsq;

         // simulate magnetic forces towards three magnets using 
         // Coulomb's 2nd law - attraction falls off with distance square
         for (int m = 0; m < 3; m++) {
            dx = magnetX_[m] - x;
            dy = magnetY_[m] - y;
            r = Math.sqrt(dx*dx + dy*dy + height_*height_);
            if (r < 0.00001)
               r = 0.00001;
            over_rcube = 1.0 / (r*r*r);

            fX += magnetism_ * dx * over_rcube;
            fY += magnetism_ * dy * over_rcube;
         }

         // friction proportional to velocity
         fX -= vX*damping_;
         fY -= vY*damping_;

         // Apply forces using Newton's Law: F=mA
         vX += dtSim_ * fX / mass_;
         vY += dtSim_ * fY / mass_;

         // compute filtered velocity, to determine when the pendulum stops
         filtVel = 0.99 * filtVel + 0.1 * Math.max(Math.abs(vX), Math.abs(vY));
         lastX = x;
         lastY = y;
         x += vX;
         y += vY;

         drawNormalizedLine(lastX, lastY, x, y, g);
      }
   }

This code takes as input an x/y pair and calculates and plots for that point a trajectory over time. The function iterates over a “while” loop so that calculations continue as long as the velocity parameter remains over a threshold and the iterations do not exceed 10,000. Each subsequent point on the path is calculated as the sum of the last point and a series of separately computed forces: gravity, magnetic attraction, friction and inertia. The tendency of each force and its calculations are simple to understand individually, but their complex interactions over time are unpredictable by definition: they are chaotic.

Martin Wattenberg’s comments on Tripolar are revealing:

...reading the source code of Scott's piece changed the way I thought about it. Understanding why and how the applet keeps changing even when the mouse is motionless greatly reinforces the themes of the work... whether the source code changes the view of the piece is certainly not intrinsically bad or good. It's an especially interesting dimension to me because, unlike other visual artists, software artists necessarily write a purely verbal description of their work.

It seems as if Wattenberg, an accomplished programmer, viewed the piece before he read the code, even though the code is presented first in the show, which confirms my assertion above. The code’s comments reveal the trick of inter-pixel interpolation before the code itself does. Software artists write a purely verbal description of their work twice: once in comments, once in code. Parsing the code deepens the viewer’s understanding of the software system, but it is not a prerequisite to apprehending its logic in some fashion and there is nothing to say that time, effort and attention will not offer with through experience similar insights into the procedural logic of the work.

One familiar with chaos theory and aware of the complex boundaries created by the“Newton’s Method” simulation on which this piece is based might approach it as a scientific experiment; it presents an opportunity to empirically experience and explore the chaotic properties of the familiar system. Another kind of engagement is possible though, through either naiveté or epoché, where a viewer can gradually discover the logical properties of the system.

Each click brings forth a rendering in tiny line segments of a Lissajou daisy or eccentric spiral at the end of a curvaceous stalk. My click is towards the beginning of the stalk but not on it unless I click several times, and then the terminus approaches my click in a few steps. The dense portions of the line coalesce around one of three points. The stalk is often short when I click near any of them. Sometimes the stalk wanders around these points of attraction. If I hold down the mouse or drag, the line animates and approaches the cursor in real time. The rest of the line dances between the three poles and the tight knots of its end flutter about and tighten and loosen like springs. In some spots on the applet a small drag, or even holding the mouse down in place, sends the sinusoidal curve careening and blinking among the poles. In other regions, the line’s terminus bounces gently, while the stalk gracefully bends this way and that, or tightens around other imaginary poles. There is a place towards the center of the three main poles where I discover a fourth knot, smaller less ordered and less attractive to the line. The system is exhilaratingly wild in its variations, but it is also oddly and tightly constrained by the pull of its poles. That tension between system and chaos is fascinating. I am inserted in that chaotic system because I can click and drag at will, and my whims are matched and brought into a systematic coherence. My moves are matched and answered by a gesture that is both surprising–in that it is unpredictable–and fitting–in that it is consistent with and structurally and gesturally similar to every other signature curve produced by the applet.

As in Wattenbergs piece, Snibbe’s Tripolar reveals its logic to the user through the presentation of successive instantiations of its system. The user is inserted into that system through mouse play. In contrast to Connect the Dots, in Tripolar the system has no visual memory of itself–it leaves no traces of it’s history to merge or compare with its present. Tripolar demands that the user’s memory index it’s history to discover its systematicity. Tripolar stares back at the viewer through its three eyes, its basins of attraction, and represents each of the user’s moves as a trajectory in towards them. The user enters into the piece by dint of their magnetic pull and the small gravitational pit at its center. The user is a captive of those attractive forces and follows the empirical imperatives of their orbital paths until, through a growing comprehension of their order, they achieve the velocity of escape.


[12] He offers an uncommented version as well, but the reason is not clear. Maybe for those who want to play that perverse game of guessing–or seeing the code from the computer’s perspective; being the computer and enacting the code.