Xiaozao – Final Proposal

Embodying Nature

Concept:

Similar patterns have been found in animal bodies, plants, and even landscapes. This shows us that maybe things in nature share the same basic algorithm to form their body, including the humans. However, with the development of technology, we think that we have control over other beings and nature, and begin to forget that nature’s wisdom is inherent in our own bodies all the time.

I plan to visually explore patterns found in nature and overlay them to the viewer’s figure in the computer through their webcam. Through this project, I aim to promote awareness of our interconnectedness with nature and other living beings. While humans have developed great abilities, we remain part of the natural world that we evolved from. We should respect and learn from nature rather than try to exploit it.

Inspirations:

Implementation plan:

  1. Uncover the logic under different animal/plant patterns.
  2. Create unique patterns based on those logics.
  3. Be able to capture the viewer’s silhouette through the webcam.
  4. Overlay the patterns onto the viewer’s silhouette.

Key phrases:

  • Turing’s patterns
  • Voronoi cells
  • Colonization
  • Activator and Inhibitor

Alan Turing's Patterns in Nature, and Beyond | WIRED

 

Final project proposal – KK

Inspiration

I wanted to do something based off the climate change crisis. I want to simulate an environment that has many natural movements, weather its the ocean, birds moving together, rainfall, or fires.

I want the user’s body and movements to be detectable and have certain actions be correlated with a certain natural movement. I can use ml5.js and Posenet to track body movements.

The following links show the videos or references I am going to use for my final.

https://editor.p5js.org/jgl/sketches/XMy0GHKDIS

 

Xiaozao Week #11 Assignment

Decay

Link to sketch: https://editor.p5js.org/Xiaozao/sketches/SZ2gVL7sW

How to interact: Press the mouse to refill. Press again to decay.

After learning 1D and 2D cellular automata, I decided to create a “3D” one. However, it isn’t the real 3D using webGL, but instead showing the 3D space through a 2D perspective. I created a 3D array with x,y, and z-axis. But the z-axis is shown as “layers” and each layer is translucent, meaning that the state of cells on every layer will be stacked together to affect the overall opacity of the cell.

for (let n = 0; n < layers; n++) {
    board = create2DArray(columns, rows);
    for (let i = 1; i < columns - 1; i++) {
      for (let j = 1; j < rows - 1; j++) {
        board[i][j] = new Cell(floor(random(2)), i * scale, j * scale, scale);
      }
    }
    // console.log(board)
    boards.push(board);

 

The principle of the 3D cellular automata is similar to the 1D and 2D one. Regarding the rules or algorithms, I drew inspiration from this article, which implemented lots of interesting rules in the 3D world. https://softologyblog.wordpress.com/2019/12/28/3d-cellular-automata-3/

I modified the rules a bit. Also, I added a mouse interaction that refills the cells with another rule.

for (let z = 1; z < layers - 1; z++) {
    for (let x = 1; x < columns - 1; x++) {
      for (let y = 1; y < rows - 1; y++) {
        let neighbors = 0;
        for (let k = -1; k <= 1; k++) {
          for (let i = -1; i <= 1; i++) {
            for (let j = -1; j <= 1; j++) {
              //Use the previous state when counting neighbors
              neighbors += boards[z + k][x + i][y + j].previous;
            }
          }
        }

        neighbors -= boards[z][x][y].previous;

        // desicion
        if (growing_state == -1) {
          if (neighbors >= 13 && neighbors <= 22) {
            boards[z][x][y].state = 1;
          } else {
            boards[z][x][y].state = 0;
          }
        } else {
          if (neighbors >= 6 && neighbors <= 7) {
            boards[z][x][y].state = 1;
          } else if (boards[z][x][y].state == 1) {
            boards[z][x][y].state = 1;
          } else {
            boards[z][x][y].state = 0;
          }
        }

 

Final Project Proposal

For my final project, I want to further develop my flocking system project. I was very happy with the output of that project and want to take it another step forward. Below are some pictures from that sketch:

It would be interesting to see what other designs can be created with a similar concept. Currently, I have 2-25 circles of random sizes placed on the canvas. The flocking simulation tries to either avoid or get attracted to these circles. What I am thinking right now is that I will have the users place the objects, and they may not only be circles, but other shapes too like star, square, triangle, hexagon and so on. I will integrate matter.js for this. I will also give my users a slider to change the size of the object and also the option to either attract towards or repel away from these objects. My current design thinking is the following:

I will also provide a menu in the beginning explaining how the users can interact with the project. This is not fully developed of course, but is just an initial idea:

Final Project Proposal – Forest Fire

Concept:

In order to define fire suppression tactics and design fire risk management policies, it is important to simulate the propagation of wildfires. In my final project, I’ll be using cellular automata to model the spread of wind-driven fire across a grid-based terrain, demonstrating the dynamics of wildfires and exploring different scenarios and factors affecting their spread.

Users will be able to set the initial conditions (i.e. density of vegetation, ignition point), adjust parameters (i.e. wind speed, humidity), pause, and reset the simulation.

Initial sketches:

View post on imgur.com

View post on imgur.com

Papers to be used:

https://www.fs.usda.gov/rm/pubs_int/int_rp115.pdf

Methodology:
  • Research the propagation of fire: The case study will be the 2012 severe wildfire that took place in Algarve, Portugal, where 25 thousand hectares burned. It is interesting because it had an explosive stage between 25 and 30h after the onset.
  • Define initial states of land: vegetation type and density.

Vegetation type propagation probability:
– No vegetation: -1
– Cultivated: -0.4
– Forests: 0.4
– Shrub: 0.4

Vegetation density propagation probability:
– No vegetation: -1
– Sparse: -0.3
– Normal: 0
– Dense: 0.3

  • Implement rules governing the spread of fire: Fuel, topography, wind, and humidity.
    R1: A cell that can’t be burned stays the same
    R2: A cell that is burning down at present time will be completely burned in the next iteration.
    R3: A burned cell can’t be burned again.
    R4: If a cell is burned, and its neighbors contain vegetation fue, the fire can then propagate with a given probability (factors).

The probability will be defined as follows:

P_burn = P0(1+P_veg)(1+P_den)PwPs

P0: ignition point (user interaction)
P_veg: vegetation type
P_den: vegetation density
Ps: topography
Pw: wind speed and direction

The probability of the wind is:

Pw = exp[V(C1 + C2 (cos(o)-1))]

with C1 and C2 are adjustable coefficients
V is the wind speed
O is the angle between the wind direction and the fire propagation (if aligned, Pw increases)

The probability of the terrain is:

Ps = exp(a.o)

with a: adjustable coefficient
o: the slope angle of the terrain

Os = atan[(E1 – E2)/D]

with E: elevation of the cell
D: the size of the square cell if adjacent or sqrt(2*cellSize) if diagonal

Challenges:

Make it as realistic as possible.

Coding Assignment Week #11 – Perlin Diamonds& Final Project Idea

Inspiration: 

For this weeks coding assignment, we had to work with the concept of cellular automata to develop dynamic and aesthetically interesting patterns. One thing I find interesting about most patterns developed by cellular automata is that the clusters of objects instantiated always somewhat resemble cells or bee hives or really just any cluster that occurs in a pattern that we see in nature . So for this program, I thought of how I can give this pattern movement, which is why I integrated randomness with color and also added perlin noise.

Nature. Bright Clusters Of A Mountain Ash In Snow. Фотография, картинки, изображения и сток-фотография без роялти. Image 46653805Cell Confluency: Why It Matters and 3 Easy Methods

Progress: 

To better understand the concept I first went over the code demonstrations, and I took inspiration from the Nonrectangular Grids as they resemble a bee hive pattern.

First thing I experimented with is the trig functions, because I remember that with my midterm project that one component that made the most significant and drastic changed was trigonometery and switching around the functions and working with 1/trig functions and more. So that is what I had done above

Added color randomness

For final touches, I used the Perlin noise function to generate smooth variations in the positions.

Final Program:

Ideas for Final Project:

  • Human Body Interaction
  • Sensor tape (Borrow from art center)
  • Seeking/fleeing from  Multiple Targets(Targets being the specific sensors on the sensor tape)

Fleeing/Seeking Objects with Fractal Patterns:

  • Fractal patterns with integration of trig

Scientists discover fractal patterns in a quantum material | MIT News | Massachusetts Institute of Technology

Premium Vector | Abstract fractal patterns and shapes infinite universemysterious psychedelic relaxation pattern dynamic flowing natural forms sacred geometry

Week #11 Assignment: The Artist’s Choice by Abdelrahman Mallasi

Concept & Inspiration:

This project is inspired by Paint, the drawing application on Windows, with which I had an unhealthy obsession during my childhood. This nostalgia, combined with the concepts of Conway’s Game of Life, led to the creation of this sketch. It’s a digital canvas where users can draw cells, change their colors, and then watch as they evolve following the principles of cellular automata. It results in a constantly changing tapestry of color and form.

This sketch is an interactive playground that combines drawing and the rules of cellular evolution. Users can draw on the grid by dragging their mouse, activating cells in any pattern they desire. Pressing the spacebar changes the colors of all active cells to random colors, adding an element of surprise and vibrancy to the evolving patterns. The sketch applies the Game of Life rules when the mouse is pressed, and the frame rate was decreased, allowing users to see the evolution of the cells. The freedom to control the position, color, and evolution of cells makes for an engaging and personal experience.

Code Walkthrough:

function mouseDragged() {
  let x = floor(mouseX / w);
  let y = floor(mouseY / w);
  if (x >= 0 && x < columns && y >= 0 && y < rows) {
    board[x][y].state = 1; // Activate the cell
    board[x][y].color = [random(255), random(255), random(255)]; // Assign a random color
  }
}

This function is the heart of the sketch’s interactivity. As the user drags the mouse across the canvas, it activates cells (sets their state to 1) and assigns them a random color. This interaction is what allows the user to paint on the digital canvas.

function keyPressed() {
  if (key === ' ') {
    for (let i = 0; i < columns; i++) {
      for (let j = 0; j < rows; j++) {
        if (board[i][j].state === 1) {
          board[i][j].color = [random(255), random(255), random(255)];
        }
      }
    }
  } 
}

When the spacebar is pressed, this function kicks into action, changing the color of every alive cell to a new random color.

function generateNextBoard() {
  let next = create2DArray(columns, rows);

// looping through each cell to apply Game of Life rules
  for (let x = 0; x < columns; x++) {
    for (let y = 0; y < rows; y++) {
       // counting alive neighbors
      let neighbors = 0;
      for (let i = -1; i <= 1; i++) {
        for (let j = -1; j <= 1; j++) {
          if (i === 0 && j === 0) {
            // skip the current cell itself
            continue;
          }
          let col = (x + i + columns) % columns; //edge wrapping
          let row = (y + j + rows) % rows; // edge wrapping
          neighbors += board[col][row].state;
        }
      }

      // Rules of Life defined below

    }
  }

  // swap new board with the old
  board = next;
}

This function is invoked each time the mouse is pressed. It starts by creating a new grid called next, which will hold the next generation of cells. The function then loops through each cell in the current board to apply the rules of the Game of Life. For each cell, it counts the number of living neighbors. Finally, the board is updated to be the next grid, which moves the simulation forward one generation.

 if (board[x][y].state == 1 && (neighbors<2 || neighbors > 3)) {
       next[x][y] = new Cell(x, y, w, 0); // cell dies due to overpopulation
     } else if (board[x][y].state == 0 && neighbors == 3) {
       // cell becomes alive 
       next[x][y] = new Cell(x, y, w, 1);
       next[x][y].color = [random(255), random(255), random(255)]; //  cell gets a random color
     } else {
       
       next[x][y] = new Cell(x, y, w, board[x][y].state); // cell stays in current state
       next[x][y].color = board[x][y].color; // keep the same color
     }

These lines encapsulate Conway’s Game of Life rules within the sketch. They determine the fate of each cell based on its neighbors. A cell comes to life if it has exactly 3 neighbors, dies of overpopulation if it has more than 3 and of underpopulation if it has less than 2, and stays in its current state otherwise.

Embedded Code

Reflections and Future Ideas:

Playing with this sketch was an enjoyable experience. Tweaking the rules and observing their visual impact was fascinating.

Looking ahead, I’m intrigued by the idea of adding an auditory dimension to this project. Imagine if each cell produced a unique sound when it came to life, creating a melody that evolves with the pattern. While I’m not yet sure how feasible this is, the idea of combining visual and auditory elements in the CA universe is exciting to explore.

Final Project Proposal: Interactive Flocking/CA Art

For my final project, I want to create a flocking/cellular automata based generative art similar to the following inspirations:

MARCUS VOLZ, on exploring generative art | CLOT Magazine

Flocking behavior, swarm models, and art in 2023 | Human art, Generative, Abstract artwork

Boids III | github.com/hdevalence/sketches/tree/master/boids… | Flickr

Imagining Science: Anders Hoff's Generative Art

Interactivity

For interactivity, I want the users to be mostly involved in the generative art. I have a superficial idea of what I want to do, which might fail, but I will give it a try.

My initial idea is to have two devices to participate in generating the art, but what influences the art is the gravity and position difference taken from the device’s movements. Ideally the devices would be mobile phones.

For measurements, I will rely on device motion listeners that are supported on most browsers today, but, of course, will do my experiment and see how doable it is.

Here’s a page that describes device motions and gives examples:

https://whatwebcando.today/device-motion.html

Idea Sketch

Cellular Automata Experimentation

On this assignment, my main goal is to explore cellular automata that we learned in class. However, there are a few parameters changed namely color, initial condition, and size of the cell.

Here’s the sketch:


Initially the board is constructed with vertices instead of squares and these vertices when rendered on board, they shift their position with a random offset of [-3, 3).

This helps us create a special noise like variation as shown below:

Implementation of this offset is shown below:

For interactivity, there is a slider that changes the resolution/width of the cells ranging from [5, 20].