Raya Tabassum: Reading Response 2

The first chapter of “The Art of Interactive Design” by Chris Crawford lays out the foundation for understanding what interaction is in the first place. On the other hand, Crawford distinguished between interaction and mere reaction by insisting on the two-way process of communication and stated that a cyclic process is necessary where two actors listen, think, and speak alternately. Crawford’s definition makes one start to question the extent to which the present technologies achieve real interaction versus offering sophisticated forms of reaction. For instance, if we look at voice-activated assistants or chatbots, how much do these systems actually engage in a listen-think-speak cycle, and how much is it just a pre-programmed set of responses to user input? The key question comes up here: can artificial intelligence, as it exists and will in all future products, actually ‘interact’ as Crawford has described interaction, or is it by necessity delegated to the simulation of interaction through a series of complex algorithms?
There are key lines of inquiry related to the ethics of designing for interaction. What, therefore, when the essence of interaction is meaningful exchange? How is it that designers ensure technologies really foster such positive interactions without the manipulation or exploitation of the user? This issue becomes very pertinent in the context of social media platforms in which interaction design can radically impact user behavior and mental health.

Moreover, Crawford’s focus on interaction as something cyclic challenges us to reason about user feedback loops in design. And his differentiation between interaction and reaction raises serious questions of how we categorize and value forms of digital engagement. This prompts us to critically reflect on whether, indeed, our daily engagements with technology are two-way interactions, that is, if as much as we respond to them, devices and platforms themselves also engage and respond to us—or whether, indeed, we are only responding to slick cues, designed by others.
I believe these questions are crucial for both designers and users as we navigate the increasingly complex landscape of interactive systems.

Reading Response – Week #3 Redha Al Hammad

The main point which stood out to me from this reading was the author’s definition of interactivity as clarified by the analogy of a conversation. I found the comparison of “input, process, output” to “listen, think, speak” to be effective in conveying interactivity today (especially since the piece was written two decades ago). On this same note, I found the mention of an interactive process requiring “two actors” to be interesting. As someone who grew up with digital technology, I subconsciously tend to either view it as a tool or an extension of myself and my actions – not as a separate active party that has the agency to “listen, think and speak” in conversation with me. I feel that the only time I consider technology’s agency is when it does not cooperate with my goal as a user as, for example, oftentimes when a website does not load or is difficult to use we place the blame on it and not the interaction itself.

Another point I found interesting was the misuse of interaction in varying different contexts. More specifically, the distinction between integration and reaction stood out to me as the author strongly claims that they have nothing to do with one another. However, I do feel that there is some element of reaction within interaction (on the human side at the very least). In the aforementioned example, a poorly constructed website will surely garner a specific reaction in the user and, in turn, will affect how they interact with it. As such, I feel that in certain cases, the two are interlinked and should not be considered entirely separate processes.

Assignment 3: State of Mind

Concept

The goal of this week’s assignment was to create a unique work of art through imagination and creativity. The original idea was to create a dynamic screensaver with a range of shapes that had different colors and speeds and interacted with the canvas and each other when they collided. However, this concept was disregarded because a more abstract art piece was needed.

So I used the original code as the template, and the project developed into a complex particle-mimicking display of forms. These particles used the idea of flow fields to mimic more organic and natural motions, leaving behind a vibrant trail as they moved. The chaos of these trails of particles is a representation of my “State of Mind” while thinking of ideas for the assignment.

Sketches


Code

The particles’ motion is directed by a grid of vectors called the flow field. Perlin noise is used in its generation to provide a fluid, flowing transition between the grid’s vectors.

for (let i = 0; i < cols; i++) {
    for (let j = 0; j < rows; j++) {
      let index = i + j * cols;
      let angle = noise(i * 0.1, j * 0.1, zoff) * TWO_PI * 4;
      flowField[index] = p5.Vector.fromAngle(angle);
    }
  }

The snippet is in the draw() loop that creates the flow field. It simulates a natural flow by using Perlin noise to generate vectors with smoothly shifting angles.

The shapes follow the flow field vectors, which guide their movement. This interaction is encapsulated in the follow() method of the BaseShape class.

follow(flowField) {
  let x = floor(this.pos.x / resolution);
  let y = floor(this.pos.y / resolution);
  let index = x + y * cols;
  let force = flowField[index];
  this.vel.add(force);
  this.vel.limit(2);
}

The shape’s position (this.pos) is used to determine its current cell in the flow field grid by dividing by the resolution. The index in the flowField array corresponding to the shape’s current cell is calculated using x + y * cols.
The vector (force) at this index is retrieved from the flowField array and added to the shape’s velocity (this.vel), steering it in the direction of the flow. this.vel.limit(2) ensures that the shape’s velocity does not exceed a certain speed, maintaining smooth, natural movement.

The trail effect is created by not fully clearing the canvas on each frame, instead drawing a semi-transparent background over the previous frame. This technique allows shapes to leave a fading trail as they move.

background(0, 0.3);

The purpose of the resetAnimation() method is to reset the animation setup and clean the canvas. To restart the flow field pattern, it first uses clear() to remove any existing shapes from the canvas, resets the shapes array to its initial state, initializeShapes() method to add a new set of randomly placed shapes, and resets the zoff variable for flow field noise.

function resetAnimation() {
  clear();
  // Clear existing shapes
  shapes = []; 
  // Repopulate with new shapes
  initializeShapes(); 
  // Reset the z-offset for flow field noise
  zoff = 0; 
 
}

The resetAnimation() method is called when the frameCount has reached 500 frames. This helps to see how the flow field changes every time it restarts.

Full Code

// array for shapes
let shapes = [];
// declare flow field variable
let flowField;
let resolution = 20;
// 2d grid for flow field
let cols, rows;
// noise increment variable
let zoff = 0;
// make the sketch again after this value
let resetFrameCount = 500;


function setup() {
  createCanvas(800, 600);
  colorMode(HSB, 255);
  blendMode(ADD);
  cols = floor(width / resolution);
  rows = floor(height / resolution);
  flowField = new Array(cols * rows);
  initializeShapes(); 
}

function draw() {
  
  if (frameCount % resetFrameCount === 0) {
    resetAnimation();
  } else {
    background(0, 0.3); 
  }

  // Flow field based on Perlin noise
  for (let i = 0; i < cols; i++) {
    for (let j = 0; j < rows; j++) {
      let index = i + j * cols;
      let angle = noise(i * 0.1, j * 0.1, zoff) * TWO_PI * 4;
      flowField[index] = p5.Vector.fromAngle(angle);
    }
  }
  
  // Increment zoff for the next frame's noise
  zoff += 0.01; 

  // Update and display each shape
  // For each shape in the array, updates its position according to the flow field, moves it, displays its trail, and display it on the canvas.
  shapes.forEach(shape => {
    shape.follow(flowField);
    shape.update();
    shape.displayTrail();
    shape.display();
    shape.particleReset();
    shape.finish();
  });

}

function resetAnimation() {
  clear();
  // Clear existing shapes
  shapes = []; 
  // Repopulate with new shapes
  initializeShapes(); 
  // Reset the z-offset for flow field noise
  zoff = 0; 
 
}

// Initialized 30 number of shapes in random and at random positions
function initializeShapes() {
  for (let i = 0; i < 30; i++) {
    let x = random(width);
    let y = random(height);
    // Randomly choose between Circle, Square, or Triangle
    let type = floor(random(3)); 
    if (type === 0) shapes.push(new CircleShape(x, y));
    else if (type === 1) shapes.push(new SquareShape(x, y));
    else shapes.push(new TriangleShape(x, y));
  }
}

class BaseShape {
  constructor(x, y) {
    this.pos = createVector(x, y);
    this.vel = p5.Vector.random2D();
    this.size = random(10, 20);
    this.rotationSpeed = random(-0.05, 0.05);
    this.rotation = random(TWO_PI);
    this.color = color(random(255), 255, 255, 50);
    this.prevPos = this.pos.copy();
  }

  follow(flowField) {
    let x = floor(this.pos.x / resolution);
    let y = floor(this.pos.y / resolution);
    let index = x + y * cols;
    let force = flowField[index];
    this.vel.add(force);
    // Smoother movement so velocity is limited
    this.vel.limit(2);  
  }

  update() {
    this.pos.add(this.vel);
    this.rotation += this.rotationSpeed;
  }

  display() {
    // Saves the current drawing state
    push();
    // Translates the drawing context to the shape's current position
    translate(this.pos.x, this.pos.y);
    // Rotates the shape's current rotation angle    
    rotate(this.rotation);
    fill(this.color);
    noStroke();
  }

  displayTrail() {
    strokeWeight(1);
    // Creates a semi-transparent color for the trail. It uses the HSB 
    let trailColor = color(hue(this.color), saturation(this.color), brightness(this.color), 20);
    stroke(trailColor);
    // Draws a line from the shape's current position to its previous position
    line(this.pos.x, this.pos.y, this.prevPos.x, this.prevPos.y);
  }

  finish() {
    this.updatePrev();
    pop();
  }

  updatePrev() {
    this.prevPos.x = this.pos.x;
    this.prevPos.y = this.pos.y;
  }

  particleReset() {
    if (this.pos.x > width) this.pos.x = 0;
    if (this.pos.x < 0) this.pos.x = width;
    if (this.pos.y > height) this.pos.y = 0;
    if (this.pos.y < 0) this.pos.y = height;
    this.updatePrev();
  }
}

class CircleShape extends BaseShape {
  display() {
    super.display();
    ellipse(0, 0, this.size);
    super.finish();
  }
}

class SquareShape extends BaseShape {
  display() {
    super.display();
    square(-this.size / 2, -this.size / 2, this.size);
    super.finish();
  }
}

class TriangleShape extends BaseShape {
  display() {
    super.display();
    triangle(
      -this.size / 2, this.size / 2,
      this.size / 2, this.size / 2,
      0, -this.size / 2
    );
    super.finish();
  }
}

Challenges

I spent a lot of time getting a grasp of noise functions and how to use them to mimic natural movements for my shapes and implement the flow field using Perlin noise. There was considerable time spent adjusting the noise-generating settings to produce a smooth, organic flow that seemed natural.

There was a small challenge to clear the canvas after a certain amount of frames. The logic of the code was fine however the previous shapes were not removed.

Reflections and Improvements

The overall experience was quite helpful. I learned to handle the different functions and classes using object-oriented programming concepts. It made it possible to use a modular. It even helped me to add more features to my code as I was creating my art piece.

I believe that there is one area of development where I could explore various noise offsets and scales to create even more varied flow fields. Playing around with these parameters might result in more complex and eye-catching visual effects.

References

I learned about flow fields through the resources provided to us. I discovered a YouTube channel, “The Coding Train“.

Assigment 3 – Functions, Arrays, and Object-Oriented Programming

Idea and Inspiration:

My piece of art aims to create an interactive garden where viewers can witness blossoming flowers and fluttering butterflies. I love nature and I wanted to make a tribute to gardens. At home, my mom and I spend hours working in the garden, it is our bonding time. This project is inspired by nature and the delight of immersing in the sensory experiences of a tranquil garden.

Code that I am proud of: 

grow() {
  if (!this.fullGrown) {
    this.size += this.growthRate;
    if (this.size >= 90) {
      this.fullGrown = true;
followMouse() {
   if (mouseIsPressed) {
     let angle = atan2(mouseY - this.y, mouseX - this.x);
     this.vx = cos(angle) * 3;
     this.vy = sin(angle) * 3;

 

Sketch: 

Difficulties: 

First of all, it was complicated to get the classes in order. It was not working as they were all in random positions. I had to change the names to numbers so that it was in the correct order.

Secondly, I wanted the flower to expand. So I searched in the internet the function to do it. “https://editor.p5js.org/amcc/sketches/3ZLqytY_4”

Thirdly, I wanted to do something interactive with the MousePress option. These lines of code use the atan2() function to determine the angle between the butterfly’s current position and the location of the mouse pointer. Next, they calculate the velocity vector’s horizontal and vertical components using the trigonometric functions cos() and sin(). These results are scaled by a factor of three to determine the butterfly’s speed as it follows the mouse pointer.

followMouse() {
   if (mouseIsPressed) {
     let angle = atan2(mouseY - this.y, mouseX - this.x);
     this.vx = cos(angle) * 3;
     this.vy = sin(angle) * 3;

Improvements: 

I am pretty proud of the work. I spend a lot of time figuring everything out. For improvements, I would like the butterflies to look more real. Adding stripes inside the body.

I think it would also be cool if the flowers after a certain amount of time they disappeared.

 

Reading Response 2- The Art of Interactive Design by Chris Crawford

Chris Crawford’s approach to explaining interactivity was something that struck me as it is not something I considered before. Crawford repeatedly likened interactivity to a conversation, one between users and systems. What I found really interesting about the way Crawford described interactivity is the fact that he showcased a somewhat strong relationship between the two. This kind of relationship goes beyond what I was accustomed to, which is that interactivity between users and systems was merely input-output interactions. In a sense, reading this challenged my preconceived notions about interactivity as it forced me to see how both users and systems actively engage and influence each other, making interactivity more dynamic than I thought it was. 

 

Although I appreciate the perspective Crawford brings in regards to the analogy of interactivity as a conversation, I still think that the author oversimplified  the nature of interactivity. Yes, Crawford showcased the dynamics and complexities of the interactions between users and systems. However, I feel like the way he showcased these interactions tended to be idealized, in a sense. The analogy of conversation made it seem as if there was seamless interaction happening between users and systems, which in reality is not the case. This disrupts the very same “flow” of interaction Crawford brought up in the chapter in regards to interactivity design. This made me question the practicality of Crawford’s analogy in interactive systems in the real world, particularly in regards to its ability to accommodate to different challenges that might appear when discussing the concept of interactivity. Thus, even if the concept of interactivity as highlighted by Crawford brought about an interesting perspective on the concept,  I still believe that, to a certain degree, Crawford needs to address the complexities that underlie the concept he speaks of throughout this chapter. 

Reading Reflection – Week #2

Having recently watched Casey Reas’ video, it’s fascinating how he navigates through concepts like art, randomness, order, chaos, algorithms, and aesthetics. One key takeaway that stood out to me is how randomness, when guided by certain rules or parameters, can lead to order – a concept that reminded me of an old game called “The Game of Life.”

In this game, lights follow a simple algorithm: if they’re lonely or surrounded by too many others, they go out; under ideal conditions, a new light emerges, creating a continuous cycle of life and death. Upon further exploration, one can realize that specific conditions, or parameters can play a crucial role. These act like guidelines, turning what might seem like randomness into a more structured and even aesthetically pleasing pattern. Imagine it as a kind of artistic recipe: the right mix of chaos and order, with a sprinkle of algorithms, can result in something visually appealing. It’s like making sense out of what initially seems like randomness, and that’s pretty cool.

In a nutshell, Reas’ video taught me that even in the seemingly chaotic world of art and algorithms, there’s an underlying order waiting to be uncovered. It’s like solving a puzzle, understanding how randomness can actually contribute to creating beautiful and ordered patterns.

Raya Tabassum: Reading Response 1

Reas navigates through the historical and contemporary landscapes where chance operations have been utilized, underscoring the balance between unpredictability and control, chaos and order.
The concept of employing randomness in art is not new; it traces back to various movements and disciplines, including Dadaism’s use of arbitrary methods to challenge artistic norms and John Cage’s explorations in music that embraced indeterminacy. Reas’ talk prompts one to question: How do these historical instances of chance operations inform and enrich our current understanding of randomness in digital art?
Reas’ emphasis on the symbiosis between order and chaos, particularly in the realm of digital arts, brings to light the nuanced dynamics of control. The artist, through the use of algorithms and computational methods, sets the stage for randomness, yet within predefined constraints. This paradoxical relationship invites reflection on the nature of creativity itself. Is true creativity found in the meticulous planning and execution of an idea, or does it emerge from the serendipitous encounters with the unexpected? The talk challenges one to consider the role of the artist in the digital age: Are they the orchestrators of chaos, the curators of randomness, or simply collaborators with the computational processes they employ?
In conclusion, Casey Reas’ talk on chance operations serves as a profound catalyst for reflection on the intersections between art, technology, and randomness. It compels one to reconsider not just the methodologies of artistic creation but the very essence of creativity and its manifestations in the digital age.

Assignment 2: Ellipses

Loops… I wasn’t really sure how I could use a for, or while loop when the draw() function is itself a loop anyways. My previous experience with programming (which isn’t much) has taught me using for, or while loops in sorting algorithms but I didn’t know where to use loops when drawing an image in p5js. In any case, I looked through the magazines to see if there was anything I felt I could do.

 

When I saw the image above, I immediately began to think about how I could create it in p5js. I knew I could use ellipses to create what, in the image, looks rings around a tube. I also knew  that by making the background black, making the outline of the ellipses white, and removing the fill of the ellipses it could look almost exactly like the image. The only problem was that I didn’t really know how to make the shape without hardcoding all the values. So, instead of hardcoding all the x-coordinate, y-coordinate, width, and height values of all the ellipses I realized I could use a for loop.

When first testing out the idea I made a class and an array and made variables of that class which I put in the array and was just testing to see what worked and what didn’t since I wasn’t familiar with the syntax. In hindsight, I didn’t need to use a class or an array but it was good practice nonetheless. In any case, I ended up with the code below:

for (let i = 0; i < ellipseArray.length; i++) {
    
    
    let something = map(i, 0, ellipseArray.length, -1, 1);

    w = map(tan(frameCount * something * 0.025), -1, 1, 0, 100);

    y = map(i, 0, ellipseArray.length, 10, height);

    ellipseArray[i].make(width / 2 - 100, y, w, 20);

    ellipseArray[i].make(width / 2 + 100, y, w, 20);
    
    
  }

The method of the class which drew the ellipse was called make. Looking at it again I could have just had ellipse() in the place of ellipseArray[i].make … it would be easier to look at but I’ll just call it good practice. Despite that, I am happy with the code I wrote above. I was especially happy with my use of the map() function. At first I wasn’t sure how to use it, I also felt that the p5js references didn’t explain it very well but with a bit of trial and error it became obvious. I was also happy with how I used the frameCount variable to make the image move. I think it might be slightly obvious that I didn’t really know what I was doing throughout all of this as I named one of my variables something, I’m still not sure what to call it but the idea was that depending on where the ellipse was in the array it would have a different value from the tan() function.

At the end, I made the background slightly transparent so that it would leave a shadow of the previous ellipses, which I think makes a similar effect as the slightly fuzzy lines that can be seen in the image I took inspiration from.

 

Reflection

I mentioned this a few times before and it is that I should just use the ellipse() function alone rather than use a class and array to make the code more readable, and maybe even more efficient. I also think I could have added more comments to explain what each line or section did, I left most of it uncommented because I myself wasn’t sure what I was doing and was making changes fairly quickly. I feel with more practice and if I lay out my thought process with comments I can be more efficient when writing my code.

Future Ideas

For the future if I ever choose to come back to this style I could have a design where it uses a trigonometric function as I used it for this assignment but the ellipses are made around the cursor then it would look cool as you move the cursor. Also, I only varied the width of the ellipse, I could also vary both the height and width in the future.

Week 2 Reading Response – Dachi Tarughishvili

Casey Reas is the inventor of Processing (software which I often used in my Freshman year of university) and is well known for many projects in digital illustrations. In Eyeo2012 he talked about chance operations which I found very intriguing and interesting for several reasons. First of all, his talk about random systems with seemingly random parameters which after some time tend to order and become homogenous (Process 18) is very much similar to what I did for assignment 2, where I used random functions while ending up with clear shapes depending on different parameters after many iterations.
His work based on “Tissue Work” highlights how small changes in parameters largely influence the paths his figures follow. I also found this true when modifying variables of my project which completely changed the shape. More surprisingly, the way the change worked started making sense in a nonmathematical context as well. Without thinking about the equations I could visually deduce how one parameter (percent) influences the resolution of the shape and the other (n) influences how it spreads.
I found it inspiring how many fields can random chance operations be used in physics, music, and obviously art. One might think how all these fields are related by underlying mathematical equations and might even explain how our entire universe works.
Seeing the random number book got me thinking about how if anything is truly random. As a student who studies computer science, we have often been told how you can’t program true randomness. I started wondering if we even need true randomness as controlled randomness helps us in many ways already. Be it encryption, algorithms, and in this case creating art.
The demo regarding triggering our imagination was truly fascinating, as it got me thinking about how our brains try to declutter chaos and try to do their best to make sense of what we see based on our preconceived notions.
I think that Casey Reas’s presentation and his personal experience show us how we might find meaning and beauty in the most unexpected (random) places which in turn should inspire us to look for order in chaos in both our fields and our personal lives.

Week 2 – Reading Response: Redefining Creativity | Haziel

I found Casey Reas’ talk about Chance Operations quite intriguing, as it reminded me of my old beliefs regarding art and its concept. Before, I had a completely different perspective about what art is and what defines artistic expression. As someone who is interested in visiting museums and art exhibitions as much as I can, my understanding of art was limited to human expressions through hand made artworks. However, as I had more contact with the digital world, I started changing this conception and appreciate the digital art, as it is showcased in the talk for example.

During his talk, Reas displays different examples of art generated by computers and algorithms. In my current understanding, it also represents art since we can use code to create different angles, shapes, colors and several other characteristics to represent feelings, emotions, and other expressions. At the same time, Reas’ talk inspired a reflection on the role of technology in shaping the contemporary art. The integration of algorithms and computational processes in art creation blurs the lines between human and machine, making me to reconsider what it means to be creative in the digital age. However, I believe it also raises concerns about the potential loss of human “touch” in art when relying too heavily on algorithms. How can we strike a balance between increasing the power of technology and preserving the essence of human creativity in art?