AI & ML

Implementing Schotter Plots with R

· 5 min read

Algorithmic Entropy: Deconstructing the Schotter Workflow

The pursuit of reproducing legacy generative art serves as an unintentional stress test for modern programming paradigms. When we look back at Georg Nees’ 1968 seminal work, Schotter, we aren't just looking at a grid of squares subjected to increasing stochastic displacement; we are looking at the foundational logic of early computer-aided design. Recently, interest in translating this specific ALGOL implementation has highlighted how far our contemporary languages have drifted from the hardware-level abstraction that defined the late sixties.

The source material, documented here on rstats on Irregularly Scheduled Programming, centers on the inherent friction of transcribing archaic, procedure-heavy logic. The original ALGOL code—a relic of a pre-object-oriented era—relies on global state and nested procedural calls that modern compilers often view with suspicion. The core of Nees’ piece is a transformation matrix applied to a 12x22 grid of squares. At each step, the algorithm introduces jitter to both position and rotation, proportional to the index of the iteration. It is a primitive, elegant demonstration of entropy masquerading as a systematic grid.

Schotter
Schotter

The technical challenge here is not the geometry, but the reproducibility of the pseudo-randomness. In modern R or Python, random number generation is a managed, seeded function. In 1968, Nees was interacting with the machine’s internal register state far more directly. Research into the original parameters reveals that the code is incomplete without its specific seeds: (1922110153) for the Cartesian shifting and (1769133315) for the rotational variance. Without these integers, the output is merely a generic grid of distorted squares; with them, it becomes the exact visual fingerprint of the 1968 original. This underscores a perennial issue in software preservation: the code may be visible, but the hidden environmental constraints—the "magic numbers"—are the true source code.

Translating this to a modern stack involves mapping procedural loops onto vectorized operations. In ALGOL, the FOR loops in the SERIE procedure act as the engine, manually incrementing grid coordinates and triggering the QUAD procedure (the square generator) at every coordinate pair. Translating this to modern languages often leads developers to fall into the trap of re-implementing the loop structure, which is computationally expensive and idiomatic-ally poor. The actual performance benefit of modern hardware should, in theory, allow for arbitrary resolution, yet we remain tethered to the original output constraints because the "art" is the distortion logic, not the canvas size.

When reviewing contemporary Python translations of this work, one notices a shift in mental models. We replace the raw memory pointers and line-drawing calls of 1968 with high-level plotting libraries. However, this abstraction layer often obscures the underlying mathematical intent. The ALGOL LINE(P1+R*COS(PSI), Q1+R*SIN(PSI)) is a direct, imperative command to the plotter. In modern stacks, we define polygons and pass them to a renderer. The former is a description of movement; the latter is a description of objects. This is the crux of why these exercises matter for software engineers: they force a confrontation with how our tools have shifted from "instructing the machine" to "defining the result."

The takeaway for the professional is simple: documentation is a subset of the implementation. When porting legacy logic, the algorithm’s structure—the loops and the geometry—is trivial to capture. The entropy, the seeding, and the environmental assumptions are where the project succeeds or fails. We are currently in an era where we can emulate almost any legacy environment with high fidelity, yet we frequently overlook the fact that the original creator's intent was inextricably linked to the limitations of their compiler. Moving forward, engineers should view these legacy snippets not as challenges to be "translated" into modern syntax, but as constraints to be understood, cataloged, and eventually re-expressed with the full awareness that the underlying random distribution—the seed—is the actual artifact, not the syntax wrapping it.

Source: Jonathan Carroll · www.r-bloggers.com