...for Game Programers!
— by Ahmad Moussa
A research project I worked on at the time.
Programming neural networks was my gateway into creative coding. I was frustrated with the slow procedure. No image generators of LLMs existed at the time.
An independent kind of research
In a nutshell: you sit down and you make something with code.
Creative Coding is a loosely defined term used to describe a wide range of artistic practices that use computer code as a medium.
Creative Code typically distinguishes itself from regular coding by the fact that it doesn't follow pre-defined specifications to solve problems for a user, but rather aims at expressing ideas and concepts.
Artists, designers and developers use creative coding to make online experiences, generative art, interactive installations, and more.
– Raphaël de Courville
After a certain high level of technical skill is achieved, science and art tend to coalesce in aesthetics, plasticity and form. The greatest scientists are always artists as well.
– Albert Einstein
We don't make mistakes, we make happy little accidents.
– Bob Ross
Inwards or Outwards
Folding Screen
Layering and Transparency
Scribbles
Ascension
Exotic Quarpets
Reflections
One of the first techniques that I learned about when I got into
Fingerprint
Tree Ring
Inkblots
Processing:
P5JS:
We also wanted to share a way of working with code where things are figured out during the process of writing the software. We called this sketching with code.
— Casey Reas
Everything you can do in P5JS you can also do without P5JS via HTML's canvas API. P5 basically uses the Canvas API functions under the hood and creates wrappers around them.
There's extensive documentation about the Canvas API on the MDN web docs. Overall P5 is just much more beginner friendly and provides some useful extras however.
Atlas of Blobs
Talk: Poetic Computation
for(let y = 0; y < 400; y++){
ellipse(200, y, 20)
}
for(let y = 0; y < 400; y+=20){
ellipse(200, y, 20)
}
let t = millis()/500
for(let y = 0; y < 400; y++){
ellipse(200 + sin(t) * 20, y, 20)
}
let t = millis()/500
for(let y = 0; y < 400; y++){
ellipse(200 + sin(t + y/40) * 20, y, 20)
}
let t = millis()/500
for(let y = 0; y < 400; y++){
ellipse(
200 + sin(t + y/40) * 20,
y,
20 + sin(t + y/10) * 20)
}
let t = millis()/500
for(let y = 0; y < 400; y++){
fill(
127.5 + 127.5 * sin(t + y/40),
127.5 - 127.5 * cos(t + y/40),
127.5 + 127.5 * cos(t + y/40)
)
ellipse(
200 + sin(t + y/40) * 20,
y,
20 + sin(t + y/10) * 20)
}
let t = millis()/500
for(let y = 0; y < 400; y++){
fill(
127.5 + 127.5 * sin(t + y/40),
127.5 - 127.5 * cos(t + y/40),
127.5 + 127.5 * cos(t + y/40)
)
ellipse(
200 + sin(t + y/40 +
sin(t + y/400)
) * 20,
y,
20 + sin(t + y/10) * 20)
}
Variations on Hexagonal Grids
Arabesque
A tessellation or tiling is the covering of a surface, often a plane, using one or more geometric shapes, called tiles, with no overlaps and no gaps. In mathematics, tessellation can be generalized to higher dimensions and a variety of geometries.
1. Various Subdivision strategies (+Recursion)
2. Pseudo Bin Packing
3. Graph Algorithms as Space Filling Algorithms
Grids, tilings and tesselations can also be represented as graphs. Their traversal then allows for the creation of interesting visuals.
Different traversal strategies. Contour traversal to isolate the individual regions.
Inspiration vs. Recreation with Code
Suprematist Compositions in the Style of Malevich & Kandinsky
Algorithm for determining polygon intersections:
Divide & Conquer Approach
Usually the most important aspect of collision detection algorithms is efficiency, so that individual collision can easily be determined.
Kurzgesagt has a great video on this: How dumb components create intelligent systems.
Flocking behaviour of birds
Conway's Game of Life is based on 4 simple rules:
1. A cell with 3 living neighbours becomes alive.
2. A cell with less than 2 living neighbours dies.
3. A cell with 2 or 3 living neighbours stays alive.
4. A cell with more than 3 neighbours dies.
Amy Goodchild has another great article on this topic as well:
We recently started a Newsletter!
Sign up!
Important to measure how much progress you have made, and for others to learn from your work.
"You have to work a lot and not throw anything away. I worked a lot I threw away a lot, and that I regret. But I love to tear up so much."
- Vera Molnar