DRAFT 1
The enquiry I set out to explore was that of the extent to which p5.js can be used to visually model plant growth (which is at least triply iterative: each step of growth is an iteration, each system used to model a structure is an iteration, and each unique piece of code is an iteration). I sought to copy graphics from ‘The Algorithmic Beauty of Plants’ (Prusinkiewicz and Lindenmayer, 2004) which were written using Lindenmayer systems and drawn using turtle graphics.
The graphics I was copying were not written in p5.js, but they do follow a mathematical system, which should be replicable. This posed a technical challenge as I am not familiar with the p5.js framework and writing JavaScript; its syntax is not intuitive to me. The code I (copied (The Coding Train, 2016) and) wrote applies the rules of the system, allowing the final product to be visually high-fidelity if those rules are obeyed. If (in the real world) one plants a selection of seeds from the same plant and with the same genetic make-up, the plants that are “3D-printed” from that code are not going to be identical. Thus, I would like to explore the introduction of randomness/stochasticity, so that there is an element of surprise with each iteration of the code being run, much like seeds of the same plant produce different-looking iterations from the same genetic codebase. This is truer to nature but still mathematically true.
p5.js is effective as a vector for transmission of ideas expressed in mathematics and code into visual graphics, which themselves can be iterated over. I intend to push the boundaries of the outputs of the systems I have explored, changing parameters to investigate possibilities which are more akin to the organic forms of the real world, as well as deviations from what looks “natural”.
DRAFT 2
The enquiry I set out to explore was that of the extent to which p5.js can be used to visually model plant growth (which is at least triply iterative: each step of growth is an iteration, each system used to model a structure is an iteration, and each unique piece of code is an iteration). I sought to copy graphics from ‘The Algorithmic Beauty of Plants’ (Prusinkiewicz and Lindenmayer, 2004) which were written using Lindenmayer systems and drawn using turtle graphics.
The graphics I was copying were not written in p5.js, but they do follow a mathematical system, which should be replicable. This posed a technical challenge as I am not familiar with the p5.js framework and writing JavaScript; its syntax is not intuitive to me. The code I (used as a reference (The Coding Train, 2016) and) wrote applies the rules of the system, allowing the final product to be visually high-fidelity if those rules are obeyed.
In the real world, the growth of plants is affected by many variables, not only the genetic code from which they are “3D-printed”, but also light levels, temperature, soil pH, et cetera. The seeds of the same plant do not all produce identical outcomes. Contrarily, a (deterministic) p5.js Lindenmayer system will always produce the same adherence to the rules it is programmed to generate. Such a system also reduces the “continuous growth of cells” (Prusinkiewicz and Lindenmayer, 2004) to something “binary, discrete, and deterministic” (Tenen, 2017). How could one disrupt this digital discreteness and determinism?
Thinking about this through the lens of Tenen’s exposition of the analogue versus the digital (Tenan, 2017), p5.js is a “relatively neutral conduit” for which the “modalit[ies] of information” (input parameters) can affect its visual output. What if the input was not just JavaScript code (which is the essence of p5.js), but a different modality? Here I sought to ‘hack’ the library by allowing inputs outside of the code, specifically, microphone input, to alter the graphics. The mathematical rules the code contains remain the same, but their expression changes “style” (Ording, 2019) as the modality of sound waves from the ‘real world’ are allowed to speak into the code and alter the parameters of angle and length for each iteration.
The result is that the p5.js renderings are “[n]either wholly digital nor wholly analog[ue]” (Tenan, 2017). Continuous sound waves alter the visual product of a discrete coded system, opening a realm of “expressive, cognitive, and imaginative possibilities” (Ording, 2019).
DRAFT 3: SNIPPET
REFERENCES
- Philip Ording, (A Few of) 99 Variations on a Proof, 2019.
- Prusinkiewicz, P. and Lindenmayer, A. (2004) The Algorithmic Beauty of Plants. New York: Springer Verlag.
- Dennis Tenen ‘Literature down to a pixel’ Plain Text: The Poetics of Computation Stanford: Stanford University Press 2017pp. 165-195.
- The Coding Train (2016) Coding Challenge #16: L-System Fractal Trees. 31 May 2016. Available at: https://www.youtube.com/watch?v=E1B4UoSQMFw (Accessed: 12 January 2024).