Week 3 – Reflection post

When I first read that activities like reading or dancing are not really interactive, I was confused. I always thought that simply reacting to something counted as interacting, so I had to question my own assumptions. Crawford explains that strong interaction requires three elements: listening, thinking, and speaking. Listening is when the system notices what the user does, thinking is when it figures out how to respond, and speaking is when it actually shows that response. I realized that many of my sketches are more reactive than interactive. They respond to clicks or mouse movement, but they do not really “think.” Without all three elements, interaction feels one-sided or unsatisfying. Thinking about this helped me see that interactivity is really a two-way conversation, where the program and the user are both active participants. The reading also made me reflect on the balance between predictability and surprise. If the sketch always responds the same way, it quickly becomes boring. If it responds randomly without logic, it can feel confusing. Strong interactivity happens when the user feels like their actions truly matter, but the system also has its own personality and reasoning.

For my p5 sketches, I want to build this type of interactivity. In my most recent mosaic-style sketch, the program could listen to which shapes the user clicks or where the mouse moves, think by changing the lines, colors, or arcs, and speak by  updating the patterns on the canvas. I also want to add keyboard functions so pressing keys can change the color of something or the layout. By including randomness or subtle variations, each interaction would feel unique while still making sense. This way, the user is not just observing the sketch, they are influencing it, experimenting, and finding out how different interactions can lead to different outcomes. Adding these layers of responsiveness would make the sketch feel alive and engaging, showing the strongest form of interactivity that Crawford describes.

Week 3 – Generative Artwork

“We are all mosaics of the people we’ve met.”

This artwork started as an idea I couldn’t stop thinking about: what if all the people and experiences in our lives were shapes in a giant, messy mosaic, connected by invisible lines we carry with us? So I made it happen. Each shape, circles, squares, triangles, and some random oddballs, represents a person or a memory. The lines connecting them are the invisible threads of influence that never really go away, no matter where you move or who you become.

I wanted this mosaic to feel alive. It’s not static. The shapes can move around when you click on them, but the connections always stay. It’s a simple interactive twist, but I love how it visually represents the idea that we carry pieces of each other wherever we go. You can almost imagine it breathing, like a community of little tiles that are all related in some way.

 

How I Built It: 

I used Object-Oriented Programming because I wanted each shape to feel like its own little character, with its own position, size, rotation, and even “friends,” aka connections to other shapes. All the shapes live in an array, which makes it super easy to loop through them to draw, animate, and update lines.

The movement was trickier than I thought. I used lerp() to make shapes glide smoothly toward new spots instead of jumping around like they were hyperactive. And here’s a cool tip I learned from The Coding Train: push() and pop() are lifesavers for isolating transformations like rotation and translation. Without them, every rotation or move would have messed up all the other shapes. Honestly, watching that video was a game-changer. I finally understood why isolating transformations is so important in generative art.

The hardest part was keeping the lines connected while shapes moved independently. At first, I tried drawing straight lines, but it looked rigid and didn’t feel like a living mosaic. I solved it by using curved lines with quadratic vertex and a little randomness to the midpoint, which made the connections feel fluid and unique. I also had to carefully loop through each shape’s connections array so that every connection stayed accurate even when shapes moved.I must have spent hours fiddling with arrays and connections, trying to get it to feel smooth but not rigid. I think it ended up working, and honestly, I kind of love the little quirks. The lines stretch and bend in ways that feel alive. The code snippet: 

// Draw connecting lines
stroke(255, 100);
strokeWeight(2);
for (let i = 0; i < shapes.length; i++) {
  for (let target of shapes[i].connections) {
    // curved line for mosaic effect
    let mx = (shapes[i].x + shapes[target].x) / 2 + random(-20, 20);
    let my = (shapes[i].y + shapes[target].y) / 2 + random(-20, 20);
    noFill();
    beginShape();
    vertex(shapes[i].x, shapes[i].y);
    quadraticVertex(mx, my, shapes[target].x, shapes[target].y);
    endShape();
  }
}

The Interactivity:

You can click on any shape, and it will move to a new random location. The lines stretch and follow, showing that even if things move around in life, the connections remain. I considered adding drag-and-drop or color changes, but I kind of like it simple. Letting the shapes shift on their own feels like they have a mind of their own.

Reflection : 

This project taught me a few things:

  • Classes and arrays are magical once you get them to work together 
  • lerp() is a lifesaver for smooth motion 
  • push() and pop() are your best friends for rotations and translations (thanks, Coding Train) 
  • Generative art can be messy and chaotic, but sometimes that’s exactly the point 

If I did this again, I’d probably add more personality to each shape, maybe tiny patterns or colors that reflect “who” each piece is. For now, I like how it’s simple, a little messy, and interactive, like a mini community on the screen.

Reading Reflection – Week 3

“Any idea worthy of my attention is probably too big and too complicated to be reduced to some schoolmarmish formula.”  I was quite shocked when I read this sentence. Not because I disagree, but because I feel like the whole world should read this sentence. I have always thought that society tries to package thought into neat definitions and slogans, which is not only convenient but, in my opinion, shallow. This line reminded me that oversimplification can actually strip an idea of its essence, turning something profound into something hollow. This reading overall was peppered with ideas that made me question most of what I knew about interactivity. Examples include the idea that many things typically labelled as ‘interactions’ are actually ‘reactions’, that interactivity could be a subjective concept that exists in the eye of the interactor, and that two strong factors cannot, in fact, outweigh the weakness of the third (a principle I personally used a lot).

All this combined, I think there are a few characteristics that would define a strongly interactive system. Firstly, I think the level of interactivity should be “high”. In terms of the metaphors used in the text, that would mean strong listening, speaking, and thinking simultaneously. Secondly, adaptability needs to work both ways. The system should be able to adapt to the user and the user to the system. Thirdly, I think it’s important that the user feel in control, rather than fighting the system, which is what happens when ‘interactive’ systems are built without proper understanding of what interactivity is. Finally, and this may sound vague, but a system is “strongly interactive” when the user’s “interaction” is so absorbing that it makes them not want to stop.  When the author brought up movies, it reminded me of the interactive story game apps that were popular a few years ago, where the user played a part in how the story moved forward. Maybe this is a “low” level of interaction, but it seemed to really have people hooked at the time. That said, I would agree with Crawford that interactivity is more of a spectrum, and it’s important to maintain its balance in artworks.

Through these ideas, I thought about how the user can have the chance to influence my p5js sketches. Maybe this could be through having a say in the color palette or the illustration style, or by having buttons that change the nature of the sketch completely. Maybe clicking on the canvas can add more of already existing elements, or cause different elements within the sketch to interact with each other. The possibilities are endless.

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

My artwork shows three race cars speeding along a simple racetrack. I love Formula 1 racing, so I wanted to recreate that feeling of speed. I was inspired by the basic car sketch example from our course website but decided to add my own twist and take it a step further by making it interactive. The cars keep looping so it looks like they are racing, and when you click a car, the FPS increases so it look like the race speeds up. Pressing R resets everything back to normal speed. I also designed a simple racetrack with grass, yellow side lines, and dashed lane markers so the cars look like they have their own lanes.

The inspiration for this piece came from our course website, which is where I found the basic car sketch as well as our substitute lesson last week with professor Riad where we explored the ball example using arrays and classes together. I used that same logic but applied it to race cars instead of balls. I also watched a few beginner p5.js tutorials on YouTube to understand how to make objects move, wrap around, and respond to mouse clicks. It took me a lot of time because I am a beginner, but I learned so much through the process.

Before starting to code, I sketched out my track layout and car design on paper. This helped me visualize the dimensions of the canvas, where the grass and track edges should be, and how many dashed lanes I needed to divide the road evenly. I also planned the car shape very simply just a rectangle with two filled circles as wheels  because I wanted something that looked good but stayed beginner-friendly to code. On the side, I brainstormed interactions like clicking for color changes or speed boosts, eventually deciding on the speed change because it made the race feel more alive. This sketch was a key part of my process because it gave me a clear plan and made the coding step much easier and less confusing. It also reminded me that even with simple shapes, I could create something that feels playful and interactive.

In terms of how I organized my code, I used a setup() function to create the canvas and make three cars with different colors and speeds. These cars are stored in an array so I can easily loop through them. The draw() function runs every frame and draws the track, moves the cars, and displays them. I made a Car class with three main functions: move() to update the car’s position, show() to draw the car’s body and wheels, and clicked(Mx, My) to check if the mouse is inside the car. I also made separate functions called drawTrack() and drawDashedLine() to handle the background design so that my code stays neat and organized.

One of the parts I’m most proud of is this snippet of code:

// make cars faster when mouse is pressed (click on any car)
function mousePressed() {
  for (let i = 0; i < cars.length; i++) {
    if (cars[i].clicked(mouseX, mouseY)) {
      fps = min(fps + 10, 120); // increase frame rate
    }
  }
}

// reset when R is pressed
function keyPressed() {
  if (key === "r" || key === "R") {
    fps = 60; // reset fps
  }

This code is what makes the program interactive and fun. When the mouse is pressed, the for loop goes through every car in the array and checks if we clicked on it using the clicked() function. If we did, the frame rate (fps) goes up by 10, but never past 120 because I used the min() function to cap it. This makes the cars look like they are racing faster. The keyPressed() function resets the speed when I press R. It took me some time to this figure out how to change the FPS, but once I got it working, it felt very satisfying and made the project feel like a real race.

This was my first time using classes and arrays together in JavaScript, so it took me a long time to get it right. I had to watch many videos, look at examples, and experiment with my code to get the movement, wrapping, and interactions working correctly. The biggest challenge was figuring out how to make the cars speed up when clicked I first tried changing only one car’s speed, but it looked strange. Eventually, I made the whole race go faster when you click, which feels much more exciting and gives the sense of a real race picking up speed. Even though it was challenging, I am proud of how it turned out and I learned a lot in the process.

Week 3 Generative Art

The inspiration for this art piece came from cherry blossoms in Japan. My friend was telling me stories of when she visited and how beautiful, peaceful, and calming being around the blossoms felt for her. While exploring generative art online, I also came across examples of flow fields that captured a similar sense of beauty. I liked one of the examples and decided to integrate that idea with the concept of cherry blossoms.

For this piece, I try to mimic the nature of cherry blossoms and recreate that positive, calming environment around them. Each circle in this artwork represents a blossom, drifting softly in circular motion like petals swaying in a spring breeze. They begin large and vivid, then slowly shrink, mirroring the delicate, short-lived bloom of cherry trees that peak for only a brief moment before fading. Because cherry blossoms symbolize new beginnings and fresh starts, every click becomes a moment of renewal. The background’s soft pink hue further evokes this atmosphere.

move() {
    // moving ball in a circular motion
    this.angle += this.speed;

    // Calculate new position
    this.x = this.x + (this.d / 2) * cos(this.angle);
    this.y = this.y + (this.d / 2) * sin(this.angle);
  }

The above code defines the movement of class and is particularly something I’m really proud of. In class so far we have only talked about linear motion but I have observed that many of my classmates have used sin and cosine functions, hence, for this project I decided to venture out, learn something new and incorporate it into the sketch. In the code the angle increases by speed and while mapping it in x-coordinate, y-coordinate I know that x=r*cos(angle), y=r*sin(angle) and since we are increase the x by this value, I add it to this.x.

One challenge I faced while creating this artwork was drawing the circular path of motion. At first, I wasn’t sure how to model this in p5.js. After some research, I discovered that sine and cosine functions could be used to trace circular paths, and I learned how to increase the angle gradually to animate the motion. Another challenge was resizing the blossoms: initially, all my circles shrank to a fixed diameter of 20, but I wanted each to reduce to a random size. To solve this, I introduced a  targetSize variable, which allowed each blossom to shrink smoothly to its own unique final size.

In the future, I would like to add gradual color transitions. Specifically, I imagine the blossoms changing from colorful hues to red, where red represents the fading or “death” of the blossoms. I think this would add another poetic layer to the theme of impermanence.

Week 3 – Reading Response

A strongly interactive system, in my view, must first be intuitive. This doesn’t mean it has to be entirely self-explanatory, but if users need several pages of instructions just to figure out how to interact, the design has already failed. I mean who is going to even read 2 pages of manual/instructions these days, right? The interaction should feel discoverable through exploration.

As Crawford explains, any interaction has three parts: listen, think, and speak. If even one of these elements is weak, the entire interaction becomes unsatisfying. I think that in creative computing or digital art we often overemphasize the input (listening) and visuals (speaking) but ignore the algorithm or logic (thinking). The system should have enough diversity in its logic to produce interesting, varied outcomes rather than repeating the same response every time. Take Super Mario as an example. Imagine a version where you could only press the spacebar to jump, and Mario never actually moves only the background scrolls to simulate motion. Technically, that would still be “interactive,” but it would quickly become boring. A good interactive system allows you to achieve multiple outcomes for example move left, right, jump, pause, and even fail in different ways, giving players control. This diversity of interaction is what makes it engaging.

I also think interaction should strike a balance between predictability and surprise as we’ve discussed in class. Too much predictability leads to boredom  for instance, a game with only one level becomes dull after you memorize where every obstacle is. But if an interaction is completely chaotic it becomes unintuitive  and confusing. The balance is a design where users can learn patterns but still encounter enough new elements to stay curious.

Reflecting on my own p5 sketches, I realize I rely heavily on mouse clicks, which makes them feel reactive rather than truly interactive. To improve, I could add keyboard controls, use microphone input for both visual and audio effects, and introduce randomness so every run feels slightly different. Immediate feedback maybe by simulating animations, color changes etc. would also make interactions more interesting. Finally, asking friends to try the sketches and improving based on their feedback would help me design from the user’s perspective, not just my own.

 

Week 3 – OOP

Concept – Inspiration
I want to keep my portfolio for this class associated with Dexter series as long as possible because assignments are not very specific and require some kind of inspiration to make. I thought while I’m passionate about this TV show, why not save myself time and just pursue doing this assignment inspired by it. For this assignment I used OOP, classes, and different mouse functions as I mentioned in my previous post. My inspiration were blood stains on white walls. Dexter was a blood spatter analyst, and he had pictures of some in his office. So, by holding left-click and dragging across the screen user would draw thinner blood lines along the cursor, while when pressing the key, user would draw big chunk of blood in form a circle where cursor is located. Also, by scrolling mouseWheel user would be able to clean the wall from blood using pop().

Dexter Blood Splatter Pictures In Lab? | RPF Costume and Prop Maker Community

Highlight of the code

function mouseDragged() {
  if (mouseButton === LEFT) {
    marks.push(new BloodCluster(mouseX, mouseY)); // one cluster per drag
  }
}

function keyPressed() {
  marks.push(new Tomato(mouseX, mouseY));
}

function mouseWheel() {
  if (marks.length > 0) {
    marks.pop(); // remove last (cluster or tomato)
  }
}

(Do not give too much attention to class called ‘Tomato’ it is just for me to navigate throughout the code better). Apart from that, I think this part of the code the crucial rule. it helps with drawing blood lines and bigger blood drops on the wall and cleaning it using mouseWheel(). Generally, I think also using arrays to store blood stains and then applying .pop() was the part of the code that helped a lot to perform next actions. Of course, in order to understand how those functions work, I looked through p5js reference page for keyPressed() and mouseDragged().

Sketch
Initially, I had some issue with class Tomato drawing oscillating circles as blood marks and troubles with cleaning the wall from blood marks in general when using mouseWheel(). But, after storing marks inside the array, applying .pop(), and some clever code arrangement the issues were solved. To be honest, took a lot of time to figure it out.

Reflection
I’m quite fulfilled by the work I’ve done. It definitely followed my initial vision of how I wanted my final result to look like. I like how neat everything looks in code, the organization is very easy to understand. I learned new functions and wise use of arrays to store blood marks using marks = []. In the future, I want to incorporate more mouse functions in my projects to enhance the interactivity of the project like mouseReleased() would also draw some different kind of blood. Also, I would want to make specific type of blood pattern when pressing the key, so blood marks would be kind of the same – more like in real life.

Week 3 – Shahram Chaudhry – Connections

We are surrounded by people every day , especially as students living on campus. We run into people everywhere, be it the dining hall, the library or even the laundry rooms. I wanted to capture that feeling by filling the entire canvas with people (the dots represent people).

But we don’t actually connect with everyone we see. In my sketch, I use distance as a threshold that determines whether a line forms between two people. The line symbolizes the emotional closeness. If two people get close enough emotionally, a connection forms between them. But life happens. People drift apart, connections break (i.e. line disappears). This is very dynamic, just like in real life.

Also, when the user clicks, a new person appear almost like meeting someone new. At first they are brightly colored because they don’t exactly fit in our network of people just yet, but over time they fade into black, representing how over time they become part of our network. While they are still “new” they don’t form any connections which mirrors how it usually takes time before we can emotionally connect with a new person. The more you click, the more new people are added, just like how engaging with others more often leads to a growing network.

Here’s the code:

let people = [];
let numPeople = 30;
let connectionDistance = 80;

const newPeopleColour = [
  [255, 0, 0],    
  [0, 255, 0],    
  [0, 0, 255],    
  [255, 255, 0],  
  [255, 0, 255],  
  [0, 255, 255],  
  [255, 128, 0],  
  [128, 0, 255]   
];

function setup() {
  createCanvas(600, 400);
  // Create initial people 
  for (let i = 0; i < numPeople; i++) {
    people.push(new Person(random(0,width), random(0,height), false));
  }
}

function draw() {
  background(240);
  for (let i = 0; i < people.length; i++) {
    // Update & display the person
    people[i].move();
    people[i].updateColor();
    people[i].display();

    // Check distance with all other people and make connections 
    for (let j = i + 1; j < people.length; j++) {
      let d = dist(people[i].x, people[i].y, people[j].x, people[j].y);
      //if close enough and not new make connection
      if (!people[i].isNew && !people[j].isNew && d < connectionDistance) {
        stroke(0,50);
        line(people[i].x, people[i].y, people[j].x, people[j].y);
      }
    }
  }
}

function mousePressed() {
  people.push(new Person(mouseX, mouseY, true));
}

class Person {
  constructor(x, y, isNew) {
    this.x = x;
    this.y = y;

    this.speedX = random(-3, 3);
    this.speedY = random(-3, 3);

    if (isNew) {
      // Pick a bright random color
      let c = random(newPeopleColour);
      this.r = c[0];
      this.g = c[1];
      this.b = c[2];
      this.isNew = true;
    } else {
      // For initial people make them black
      this.r = 0;
      this.g = 0;
      this.b = 0;
      this.isNew = false;
    }
  }

  move() {
    this.x += this.speedX;
    this.y += this.speedY;

    // Bounce off edges
    if (this.x < 0 || this.x > width) {
      this.speedX *= -1;
    }
    if (this.y < 0 || this.y > height) {
      this.speedY *= -1;
    }
  }

  updateColor() {
    if (this.isNew) {
      // Fade to black eventually 
      this.r = max(0, this.r - 1);
      this.g = max(0, this.g - 1);
      this.b = max(0, this.b - 1);

      if (this.r === 0 && this.g === 0 && this.b === 0) {
        this.isNew = false;
      }
    }
  }

  display() {
    noStroke();
    fill(this.r, this.g, this.b);
    ellipse(this.x, this.y, 8, 8);
  }
}

The main challenge I faced was that at first, two lines were being drawn between the same two people which broke the clean look of the network. I solved this by using a nested for loop and tarting j from i + 1 which avoided checking duplicate pairs and made sure each connection line was only drawn once. I also really like the colour-fading logic, it’s simple but menaingful as new people slowly assimilate into the network. The max() function is a small but important detail, it prevents colors from becoming negative and making sure the isNew flag flips to false so these people can eventually form connections.

In terms of future work and improvements, I could add a ‘main character’ , a single person who’s at the center and stays still while the rest of the network moves and connects around them. This would focus on the idea of how one person’s network changes.

Week 3 – Reading Reflection

What do you consider to be the characteristics of a strongly interactive system?
After reading Chris Crawford’s chapter on Interactivity, I would strongly agree with what he has to say. It is definitely when both parties (actors as he says) are listening, thinking, and speaking. Otherwise, in more computer terms providing input, processing, and producing output. How would we measure the strength of interactivity of each system? To be honest, as long as it has those three components, I would consider the system interactive. However, whether it is super interactive or less interactive I think depends on person’s perception of what’s is enough interactivity for artwork and what’s not. For example, for me any type solo video-game like ‘Jedi Fallen Order’ is already a peak of interactivity because you control the character, you listen what the game instructs you to do, you think, and game also challenges you too. I feel like making the user think critically and act is an excellent characteristic for strong interactive system.

What ideas do you have for improving the degree of user interaction in your p5 sketches?
The one thing that comes to my mind is how we use mouseX and mouseY commands to make something move along our cursor. Also, new commands introduced by the end of the class using mousePressed, scroll, mouseReleased are too a way to interact in p5js. I would love to incorporate more of such functions in my future sketches to express my feelings and interests.

Week 3 – Reading Reflection

It was really interesting (and funny) to read this first chapter of The Art of Interactive Design. I have never thought that interactivity could be so different and have its’ ‘levels’. And to answer the question proposed at the end of the book, Are rugs interactive? my answer is yes, but the interaction is low, because it’s one sided (just like a fridge).

If I talk about my idea of interaction, I think it’s when the users can engage with the interface. A strongly interactive system is characterized by its ability to respond to user input in meaningful and timely ways. Such systems provide clear cues about how the user can act, make the results of actions visible, and maintain a balance between user control and system guidance. Importantly, they allow exploration and learning by allowing users to experiment without fear of irreversible mistakes.

In my p5 sketches, these principles suggest several ways to improve interaction. For example, I can add more responsive feedback, like visual or auditory cues when users click or hover over elements. Allowing users to customize aspects of the sketch, such as colors, speeds, or behaviors, can enhance engagement. Introducing elements of exploration, like hidden surprises or random effects, encourages experimentation. Additionally, implementing smoother animations and more natural movements, rather than abrupt changes, can make interactions feel more intuitive and satisfying. Overall, designing sketches that are predictable yet playful, and that reward user input, aligns with the chapter’s emphasis on creating systems that are both interactive and enjoyable.