Week 3_Generative Artwork

 

click to change scene

Concept

 

 

 

 

 

 

The idea came from jet skiing, which I do casually, so I already had a clear picture in my head of what the water looks like from the seat, the way the surface keeps moving underneath you and the horizon never sits still. I also took inspiration from the car example that was posted for the class. That example uses a simple object moving across the screen against a background, and I used the same basic structure here, but replaced the car with a jet ski and the road with a moving sea.

I extended the idea in two ways. The first is the water itself; instead of one flat background, the ocean is built from four Wave objects stored in an array, each one drawn lower, darker and moving at a slightly different speed. Drawing them in order means the closer waves cover the ones behind, which gives a sense of depth, and the topmost wave doubles as the horizon so the sky meets the sea along a curve rather than a straight line. The second addition is time of day. Clicking the canvas switches the whole scene between daytime and nighttime, changing the sky and water colours and swapping the sun for a crescent moon with stars behind it. I wanted the piece to have more than one state so there was a reason for the viewer to interact with it rather than just watch it.

How it was made

The sketch is built from four classes: Wave handles one band of water, Bubble is a small circle that floats upwards, Star is a dot in the sky, and Jet ski draws the craft and its rider. Each class stores its own values in the constructor and has its own move and display methods, so the draw function stays short; it just loops through the arrays and tells each object to move and draw itself.

The objects are created once in setup using for loops and stored in three arrays: waves, bubbles and stars. Doing it this way means I can change how busy the scene is by editing a single number. Asking for seventy stars instead of twenty is one character in a loop condition, not seventy lines of code, and this is the main reason the program uses objects and arrays.

The most important part of the code

beginShape();
    vertex(0, height);
    for (let x = 0; x <= width; x += 10) {
      vertex(x, this.y + sin(x * 0.02 + this.offset) * this.waveHeight);
    }
    vertex(width, height);
    endShape(CLOSE);

This builds one wave as a single filled shape. The loop walks across the canvas and places a point every ten pixels. The height of each point comes from sin, which rises and falls smoothly between -1 and 1, so multiplying it by the wave height turns that into a rise and fall measured in pixels. Adding the offset shifts where the curve starts, and because the move method increases that offset a little every frame, the whole wave appears to travel sideways. The two extra vertex calls at the bottom corners close the shape off so it fills downwards instead of being just a line.

What makes this the key part is that everything else in the artwork depends on it. Each Wave object is given its own wave height, speed and starting offset, so the same six lines produce four waves that all look different and move at different rates. That difference in speed is what creates the sense of depth, since the nearer waves move faster than the ones further away. Without this one piece of code the scene would just be flat blocks of color.

Reflection

The hardest part of this project was not writing the classes themselves but getting the layers to sit correctly on top of each other. My first version drew the sky as a plain rectangle ending at a fixed height, and the result looked wrong straight away; there was a hard straight line cutting across the middle of the canvas where the sky stopped, which broke the illusion completely. I fixed this by changing how the background is built. Instead of drawing a sky rectangle and a water rectangle, the sky color now fills the entire canvas and the waves are drawn over the bottom half of it, with the topmost wave acting as the horizon. Because that wave is made with sin like all the others, the edge between the sky and the sea is a curve rather than a straight line, and the whole scene reads as one thing instead of two blocks stacked on top of each other.

Looking back, most of my difficulties were about order and timing rather than logic; which order things are drawn in, when the canvas gets cleared, and when an object is moved relative to when it is visible. The classes and arrays were the straightforward part once I understood that a class is written once and an object is created from it many times. If I were to take this further I would like the jet ski to actually sit on the surface of the wave and tilt with it, rather than bobbing independently, since that is the one part of the scene that still gives away that the jet ski and the water are not really connected.

Week 3_Reading Response

Reflection

I think a strongly interactive system has to respond quickly and meaningfully to whatever the user does. Speed matters a lot, because if there is a noticeable delay between my action and the system’s reaction, the loop breaks and it stops feeling like a conversation. It should also accept a wide range of inputs rather than just one, and produce output that is fun and exciting to receive: sound effects, motion, color, and visuals that reward the user for engaging. Using Crawford’s framework, a strong system has to do all three steps well. It has to listen properly by capturing what the user is actually doing, think by shaping its response to that input rather than repeating itself, and speak clearly so the user can tell their action caused the result. Reliability belongs here too, since bugs and crashes break the cycle completely and a system that stops responding has stopped interacting altogether.

The other characteristic is the user’s own willingness to explore. Someone eager to poke at a system will have a far richer experience than someone who isn’t in the mood, even with identical software. A good system invites exploration by making its possibilities visible and by rewarding the first thing the user tries, which is what pulls them into trying the second.

For my own p5 sketches, my main idea is to widen the range of inputs they accept. At the moment I rely on a narrow set, so I want to make more use of the cursor; not just clicking, but position, speed, and dragging, so the sketch is continuously responding rather than waiting for one discrete event. I also want to use clicks to transform the artwork, so that each click shifts the sketch into a different look or state and gives the user a reason to keep going. Beyond that, I would like to experiment with 3D, since being able to rotate and look around a shape hands the user real control rather than just something to look at, and to play with motion that reacts to the user instead of looping on its own; if the direction or speed of movement responds to where the cursor is, the sketch is listening continuously instead of just performing.

Week 2 – Generative Art

Concept

I grew up around my father’s paintings, he is a cubist, so when this assignment asked for a work of art made out of loops, my first instinct was to try and get something of his work into it.

His paintings have a similar touch. An Emirati figure in traditional clothing, but the face is never a face. In one it is a Pepsi cap and a cola glass. In another it is a Jumeira Road sign with a traffic light on top. In a third the whole scene is an arcade cabinet, Pac-Man and Space Invaders. The body stays traditional and the head is always something imported. That contrast is the thing I wanted to borrow.

What I ended up making is a hand doing the three fingers salute that H.H Sheikh Mohammed bin Rashid does three fingers up for win, victory and love. The whole canvas is broken into irregular shapes that slide up and down against each other, the way a cubist face is broken into planes that do not line up. The hand is made of exactly the same shapes as the background, so most of the time you cannot see it at all, I also got inspiration from one of the sources to create an illusion effect with the hand and implemented it.

Then it comes out. And as it appears, it also stops moving. Everything around it keeps sliding but the hand holds completely still. It is the one fixed thing in a field that never settles. Then it fades back in and rejoins, and comes back in the next color of the flag; red, then green, then white, then black.

Code Snippet

quad(
       x + random(-j, j), y + random(-j, j) + d,
       x + s + random(-j, j), y + random(-j, j) + d,
       x + s + random(-j, j), y + s + random(-j, j) + d,
       x + random(-j, j), y + s + random(-j, j) + d
     );

This part of the code is where I was most proud of, creating those irregular shapes and making that motion of sliding against each other with the slide function, it took time and effort searching through references and working with the p5.js tutorials but I was finally able to get it. The quad() is what makes the shapes look shattered instead of like a grid. If you take out all four random() calls you are left with the plain corners of a square: x, y then x+s, y then x+s, y+s then x, y+s. Adding a small random nudge to each corner is the entire difference between a pixel grid and something that looks like a broken plane. That was the closest I could get in code to how my dad breaks a face into flat angled pieces.

Embedded Sketch

 

How This Was Made

This was made with a lot of references that were new to me. Most of them came from the p5.js reference site, where I found quad(), noise(), randomSeed(), lerpColor(), constrain(), and abs(). Each one ended up doing a specific job.

. quad() is what let me draw a four sided shape with corners anywhere I wanted, instead of rect() which is always a right angled box. Without it there is no fractured look at all.

. noise() gave me smooth randomness rather than the jumpy kind, so neighbouring facets get similar colours and the background reads as planes instead of static.

. randomSeed() solved a problem I did not see coming. The shapes flickered violently until I understood that random() runs fresh every frame, and resetting the seed at the top of draw() makes every facet keep the shape it had.

. lerpColor() mixes two colours by a proportion, which is what lets the hand fade out of the background rather than being switched on and off.

. constrain() clamps a number between two limits. I used it to flatten the top and bottom of the sine wave so the hand holds still at each end instead of permanently mid fade.

Reflection and Future Work

The thing I did not expect is how much of the piece is decided by numbers rather than by drawing. I never drew a hand. I wrote six conditions and tuned numbers until the silhouette matched a photo. That felt strange at first and then it felt like the point.

It also lined up with the Reas talk more than I thought it would. The shapes are random, but I chose the palette, the grid size, how far a corner can wander and how fast the fade runs. The randomness does the part I could not be bothered to do by hand, and it produces small irregularities I would never have thought to draw. That is the balance he was talking about.

For the future, I would use the mouseX to control how far the shapes wander, so the viewer decides how broken the image is, make the hand disappear in a better fade look than just fade without a proper effect.

 

Week 2 – Reading Reflection

Reflection:

After watching Casey Reas’ Eyeo talk, I found it very close to my own thinking. I grew up with an artist as a dad, and not just any artist, a cubist. What is cubism, you may ask? It’s a unique and funky type of art that blends different shapes and can be read differently depending on the angle you look at it from. The kind of cubism I grew up seeing also packed ideas, experiences and emotions into a single painting, leaving the viewer to guess what is going on and to find an angle nobody else had found.

That shaped how I look at art. My dad used to bring his work home and make me guess what was happening in it, so I learned to read a painting emotionally and from a perspective different from everyone else’s. This is why the talk resonated with me: art is not cold or unemotional. Every piece carries its own meaning and its own way of thinking about how the artist wanted it to reach people. What’s funny is that sometimes I would see something in his work from a perspective he hadn’t considered himself, and that is exactly what makes it beautiful.

I intend to use randomness to give my work the spark it needs. Random motion in one of the shapes, or a sudden loop of shapes overlapping the piece, could make it better than it already was. It would also create a kind of illusion, pushing viewers to think more deeply about the work instead of just staring at a controlled image, and having the viewers look at my art at different angles.

As for the balance between randomness and control, I don’t think it’s something to stress over. Writing the code is the same exchange I grew up watching: you set the rules the way my dad set his shapes, and what comes out can still surprise you, just as I sometimes found things in his paintings he had never intended. Control gives a piece the stamp of the artist’s own style, while randomness can push it somewhere nobody imagined. A piece can look like it only has one way of being seen, but the beauty comes from people finding perspectives the artist never did.

 

Week 1 – Self Portrait by Fahad Abbas

Concept:

My concept for this self-portrait was to represent my culture and background through p5.js. I wanted to express myself as well as the city I was born in, so I included the Burj Khalifa in the background as a distinguishing landmark. I represented myself through the traditional clothing called the Kandura, which is what I mostly wear on a daily basis, as well as the ghutra, which is wrapped around my head. My beard also played a big part in this self-portrait, as I believe it’s one of my most distinct features. I also wanted to experiment with animation, which I was inspired to do after seeing our previous class samples.

How this was made:

This self-portrait was made with p5.js, using a variety of features such as arcs, rectangles, ellipses, fills, and strokes. Arcs were used for the mustache, beard, mouth, and ghutra, while rectangles were used to build the Burj Khalifa and form the neck. Another interesting thing I found was the beginShape() function since I didn’t want the kandura locked into a fixed shape like a rectangle, I wanted to stretch it a bit to look more natural, and this came in handy for that.

The Burj Khalifa, on the other hand, was formed with simple rectangles at different points and sizes, which was a bit annoying to do, as I had to play around with different coordinates to get it the way I wanted. Another part where I felt a bit stuck was forming the ghutra, as I didn’t know how to shape it, so looking at previous students’ work really gave me the inspiration to visualize how I wanted it to look.

Another thing I wanted to make stand out were the eyes, especially adding the white dot next to the pupil to make them more lively and easier to look at.

A challenging part was implementing the animation for the self-portrait, as I was clueless on how to start it, but I was able to use if/else statements to make the blink and eyebrow expression happen in unison as you hover the mouse over the eyes. I looked at a few tutorials as well as AI to figure out the whole concept and apply it to my work.

Code I am Proud of:

function draw() {
  
  // Burj Khalifa
  fill(150, 180, 215);
  noStroke();
  rect(430, 340, 100, 260);
  rect(441, 210, 78, 160);
  rect(452, 105, 56, 110);
  rect(463, 55, 34, 60);
  rect(476, 25, 6, 30);

This snippet of code is the one I am most proud of, as it forms the Burj Khalifa, the finishing touch for my self-portrait. I kept thinking of different ideas for a background, but it had to be the Burj Khalifa. I was overcomplicating the code for it, as it wasn’t easy to grasp because its design is unique compared to other buildings. But then it hit me, it was much simpler than what I had made it out to be. After thinking about it for over an hour, the actual work was completed in just two minutes. I just had to add rectangles one over the other, reducing the size each time it ascends. Playing around with the coordinates was a bit annoying, but worth it in the end.

Reflection:

Working on this self-portrait taught me a lot about both p5.js and my own patience. Going in, I didn’t have much of the design experience, so just understanding how shapes like ellipses(), rect(), and arc() worked together to build a face felt overwhelming at first. Breaking the portrait down into small, separate pieces; the head, the eyes, the beard, the ghutra, made it much more manageable, since I could focus on getting one feature right before moving on to the next instead of trying to solve everything at once. The parts that meant the most to me were the ones tied to my culture: the kandura, the ghutra, and the Burj Khalifa. I wanted the portrait to say something about where I’m from, not just be a technical exercise, so getting those details right mattered more to me than getting the code perfect on the first try. The ghutra in particular took a few attempts to get looking right, and I leaned on classmates work and some trial and error to figure out how to shape it convincingly. Overall, this project pushed me to combine a personal, cultural concept with a completely new technical skill, and I’m happy with how both sides came together in the final piece.