## Assignment #2: Sense of Time

### Concept & Inspiration.

How do we understand time? How do we grasp its relativity, and how does time differ across the globe in each corner of the world?

These questions came to mind as I reflected on the nature of time. My inspiration came from a piece of artwork I encountered on Pinterest titled “Rhythm.” As I observed the moving rectangles in the artwork, they reminded me of the movement of a clock. But what do these many clocks represent? For me, they symbolized two key ideas: (1) the relativity of time, and (2) the global nature of time, with its 24 time zones that shape the rhythm of life around the world.

Additionally, I drew heavy inspiration from a talk by Casey Reas, which I reflected on in a recent writing assignment. His discussion on randomness and order heavily influenced the way in which I approached my work.

### Highlights.

In my interpretation, the background of the piece represents a chaotic flurry of clock dials, moving at a faster pace than the clock hands themselves. This fast-paced, seemingly erratic animation of ellipses symbolizes the relativity of time—its ability to feel both slow and fleeting, elusive and constant. Through this hectic background, I aimed to convey how time can feel overwhelming, moving quickly yet still slipping away before we can fully grasp it.

One aspect I’m particularly proud of is the grid of 24 clock hands, which I arranged to move with a calculated precision. Each clock hand is offset by PI/6 radians, representing a one-hour difference in the 24 time zones of the world. Although the movement of the arrows may seem chaotic when viewed all at once, there’s an underlying pattern — each line is meticulously timed to reflect the rhythm of global time. I have also learnt how to implement such functions as `push()` and `pop()`.

```for (let lineX = 0; lineX < 4; lineX++) {
for (let lineY = 0; lineY < 6; lineY++) {
push();
translate(100 + lineX * 120, 100 + lineY * 120);

let offset = (lineX * 6 + lineY) * PI / 6;
rotate(baseAngle + offset);
line(-50, 0, 50, 0);
pop();
}
}```

### Reflection.

I loved working on this project, as it gave me opportunity to master the basic knowledge of loops (specifically, “nested loops” which I got particularly curious about during the class). Furthermore, I aimed to focus more on the idea and conception (relying on the talk by Casey Reas and “randomness in order”), and gave myself more time to understand what I want to achieve before sitting to code.

Probably, the only thing I could not figure out is how to properly indicate time in numerical aspect in my artwork. In the future, I would like to create more sophisticated animated shapes so the idea is conveyed clearly.

In essence, this piece is an exploration of time’s complexity — how it can be experienced in so many different ways, how slowly yet at lighting speed it can pass by, and how it is governed by a specific order we all live within.

## Assignment 2: Loops (Want a slice?)

###### Concept

The inspiration started with the for loop lesson where we made a pattern in grid format, and in class I made a repeating pattern of an orange laid out in rows and columns. As opposed to the black and white designs from computer art magazines provided for reference, I wanted to do something more colorful and fun. Brainstorming from the ‘orange’ idea, I thought of a picnic setting! So I went onto Pinterest and looked it up for inspiration. Then I found this:

In my head, it was possible to recreate the iconic red pattern look of the picnic blanket using the for loop we learnt in class, so that’s exactly what I did. Red blocks displayed in a grid format using for loops, with lighter red blocks on the right and bottom of the red blocks to give the effect of overlapping strips of red fabric.

###### Highlight

For the cake, I’ve always wanted to learn how to rotate shapes on p5js so I challenged myself into making the cake with strawberry toppings which are repeated ellipses in a for loop that increase in angle of rotation each iteration. And I also got to use the translate function in the process!

I learnt how to rotate from here!

``` // strawberry toppings

angleMode(DEGREES);
translate(200, 200);
noStroke();
fill("rgb(238,96,67)");
for (angle = 0; angle <= 360; angle += 45) {
rotate(angle);
ellipse(0, 40, 20, 25);
}```
###### Sketch

Psst! Try hovering over the bottom right of the cake 😉

Link to the “Want a Slice?” p5js code.

###### Reflection

I really enjoyed making this piece because I learnt so many new functions, like the translate and the angleMode function, as well as applying what we learnt in class (for loops, if statements, movement of shapes).

In the future, I would love to learn how to make it less glitchy (like the strawberry here looks as if it isn’t moving in sync with the slice of cake in the back), and also maybe challenge myself into making my own version of the designs from the old computer art magazines instead of sticking to manually building images using colorful shapes!

## Reading Reflection – Week 2: Casey Reas

The video opened my eyes to the possibility of making art with the random function. I’ve used the random function before in my code for my computer science class in high school, like to generate a random number for a user to guess; but I never thought of it to be used in code to make art. After watching Casey Reas’ video, I was reminded of a TikTok video of someone using code to make an image from a single branch and over time branches off into a tree. I didn’t think much of it at the time, but now that I know what ‘randomness’ can do, I think a random function was used in the making of that tree. If I could find that video again, I’ll definitely take a closer look and see how randomness was used in the making of that art piece.

What interested me the most is how you can combined technology and non-technological ideas to make art. In the example from the video, it’s biological ideas. From an interpretation of nervous systems to computing art; this pipeline is one that I have not seen before and definitely not one I’ve thought of. So it’s something I want to explore myself. Maybe not with nervous systems, but what came to mind is how massive objects have a higher gravitational force compared to less massive objects (think sun vs planets) and it would be interesting to make code and make art using this idea.

## Assignment 2: Eye-versity

### Context:

Rather than creating my own version of an inspiration piece, I decided to spend this time exploring the functions of p5.js and to mess around with one variable at a time to really understand what it does. I knew I wanted to create something colorful and interactive, so I kept adjusting the variables until I got an idea of something I liked. Ironically, the newly learned “for” looping function was the one thing that stayed consistent throughout my trial and error process. I played around with many mouseX and mouseY functions to see the way it affected my piece. The journey to my final piece was a little long and complicated, but I eventually managed to conclude at “Eye-versity.”

### Concept:

This piece consists of a grid of lines all connected to one eye. When you move your cursor around, the lines stretch to follow the eye and the eye changes shape and color. The different variations of how the eye shape can look depends on how you move your cursor on the x or y-axis, therefore the name “Eye-versity” to represent diversity in eyes. As someone who comes from a culture where I lack the big round eyes that are the beauty standard, this piece resonates a lot with me and my experience of learning how diverse eye shapes can be amongst all ethnicities and my journey with learning to feel secure about my eyes.

### Highlight:

``` for(let x=0;x<400;x+=35){
for(let y=0;y<400;y+=35){
fill(mouseX,mouseY,mouseX,mouseY,x,y)
ellipse(mouseX,mouseY,mouseX/2,mouseY/4,x)
}
}```

I’m proud of this code because it contains everything I wanted to come out of this project: using the looping function, making it colorful, and making it interactive. I’m also proud of it because I managed to fix an issue I had with my old code that eventually resulted in this code to fix that problem.

### Reflections & Future Ideas/Improvements:

“Eye-versity” wasn’t the initial project idea that I wanted to create. The piece to the right is what I wanted to keep working on, but I couldn’t manage to get the cursor to follow the main target of the artwork, so I added a small black dot that was aligned with the cursor, and created a piece called “Pesky Fly.” I wasn’t exactly a fan of how it looked despite how cool I found the layered base to be. I tweaked the code a bit to find something that would be centered and the “fly” was still there, so I thought I could turn it into an eye for fun and then came “Eye-versity.”

For improvements, I wish I had more time to try to fix my code and create the ideal centered piece I wanted to achieve with the first idea without having to add a “fly.” I really liked how its colors looked and the way it moved, but it was really unfortunate that the cursor wasn’t centered because it bothered me a lot. In the future, I would like to work with more interactivity to make a work that’s more complex and has more movement to it. I also had an idea to create a loop of multiple paparazzi cameras flashing and clicking, so it would be nice if I could create something more aligned with my personal interests and hobbies (I like being a photographer not paparazzi.)

## Assignment 2 – Looping in the Dunes

##### Concept

When thinking about what kind of loops and patterns I would like to code for my assignment, I had my ideas brainstormed from floral patterns to portraits created using loops. But, I decided to choose a loop concept stylistically resembling the Dune movie. Since, the movie and its style is very diverse and highly aesthetic, I thought it would present a great room for experimentation (and also I am just a fan of the Dune sequel).

Looking through a Pinterest board, I’ve identified main elements that I would implement in my project, which was the sun and the desert. It was also important for me to work on the colors of the design.

Since, the coded image of the Dune universe was not as realistic as in the movie, I decided to add a pop art element of kind of vintage picture of the scene. So, I additionally added loop of the points.

##### What I’m Proud of
```//desert imitation & animation
fill ('#ea941b')
stroke('#dd691e');
strokeWeight (1);

for(let x=25;x<=550; x += 100){
for (let y=190;y<=510; y += 15){
if(mouseIsPressed){
fill(238,159,28);
arc(x,y,50,15,PI,0)
}
else {
arc(x,y,50,15,0,PI);
}
}
}

for(let x=75;x<=550; x += 100){
for (let y=190;y<=510; y += 15){
if(mouseIsPressed){
fill(216,99,29);
arc(x,y,50,15,0,PI);
} else {
arc(x,y,50,15,PI,0)
}
}
}```

I’ve been struggling a lot with how to visualize the dunes in the code. After experimenting with the arcs, I switched from noFill arcs to filled ones, cause they looked more on point in the visuals. Moreover, I wanted to animate the arcs, so I used conditionals to create some difference in the forms and image of moving dunes in the desert. I feel like I could accomplish my vision, even though it took a lot of trials.

##### Reflection

In the future development of this project, I would like to work more on the image of the dunes, to make them more realistic and appealing (so it would be easier to recognize theme of the Dune). I think this could be accomplished through Bezier curves or experimenting with another forms of arcs. Moreover, I would work on interactivity of the project, since even though it is now interactive in some way, I would like to focus specifically on resemblance of the desert environment, such as wind moving the sand or just the sunrise and the sunset. In addition, I think color scheme could be improved, by adding more gradients.

## Assignment 2 – Interactive Mandala

### Inspiration

For this assignment, the task was to make a simple work of art using loops. My first thought was that  I wanted to make something that resulted in a visually appealing pattern of some sort (with an element of interactivity as well). As I was brainstorming ideas, I scrolled through my Pinterest boards and came across various dot mandala designs. The intricate patterns and vibrant colours of these mandalas instantly caught my eye, inspiring me to create a digital version that would capture the same sense of symmetry and beauty. I wanted to explore this concept – an effect where symmetrical shapes radiate out from a center point, creating an interesting pattern.

### Concept

The core concept behind my project is to also incorporate a kaleidoscope-like pattern that keeps rotating, creating a mesmerizing visual effect. I aimed to use symmetrical shapes (circles) and a gradient of colors to mimic the aesthetic of traditional mandala designs. To add an interactive element, I decided to map the number of segments to the horizontal position of the mouse, allowing viewers to alter the complexity of the pattern by simply moving their cursor. This interaction not only makes the art more engaging but also gives viewers control over the visual complexity, making each interaction unique.

### Implementation

Here’s the final product!

I started by setting up a square canvas with a black background to make the colours stand out. The origin was moved to the center of the canvas to simplify the rotation and placement of symmetrical shapes. I used two nested loop to create the series of symmetrical shapes (circles in this case) radiating from the center. Each shape is rotated by an equal angle to maintain symmetry. The number of these symmetrical segments is dynamically adjusted based on the mouseX variable, adding interactivity.

Something I explored on my own was how to use the rotate function and incorporated it for two purposes in the artwork:

• To rotate the entire canvas continuously over time, creating the overall animation effect of the whole mandala rotating.
```background(0); // black background
translate(width/2, height/2);  // moving origin to the center of the canvas (instead of top left corner)

// Rotating the entire canvas to animate the mandala
rotate(frameCount * 0.6);  // rotating by frameCount * 0.6 to make the animation and control speed (since frameCount increases with every iteration of the draw() function)
```
• To manage the placement of individual symmetrical segments of the mandala.
```// Mapping the mouseX position to the number of symmetrical segments (between 6 and 30)
numShapes = int(map(mouseX, 0, width, 6, 30));
// print(numShapes);

let maxRadius = 250;  // max radius (distance from center of canvas till edge) for shapes

// Loop to create symmetrical patterns
for (let i = 0; i < numShapes; i++) {
push(); // saving current drawing style settings and transformations
rotate((360 / numShapes) * i);  // rotating each shape by equal angles```

While working on this project, I also learned to use the `map()` function, which became necessary for adding dynamic and interactive elements. Initially, I found it challenging to map values between different ranges, but experimenting with `map()` helped me control aspects like the number of segments, shape sizes and color gradients. By mapping the mouse position to the number of segments, I could easily adjust the pattern’s complexity, and mapping distance to hue allowed for smooth color transitions.

Another thing I did differently was use the HSB (Hue, Saturation, Brightness) colour mode instead of traditional RGB values or HEX codes. This was mainly done to create the smooth gradient that changes as you go outwards in the mandala. By mapping the shapes’ distance from the center to the hue value, I achieved a transition in colour that adds to the overall visual appeal.

### Reflections and Further Improvements

Working on this project taught me a great deal about the creative potential of code. It also deepened my understanding of how symmetry and rotation can turn simple elements into complex, visually appealing patterns. Beyond the technical skills, I discovered the importance of experimentation and iteration in the creative process, allowing me to refine my ideas to achieve the outcome I was looking for. For this project, I used circles to keep the design simple, but to achieve a more authentic mandala feel, I might want to incorporate other shapes of varying sizes in the future. This would add complexity and better mimic the intricate details often seen in traditional mandala designs. Overall, this project was a rewarding experience that broadened my perspective on combining art and coding.

## Reading Reflection – Week 2

I found myself enjoying Reas’s lecture quite a lot more than I thought, and a big part of that was the endless visual examples of works of art that he showed rather than told. It was interesting to see such diverse forms of art, and some pieces even made me question what art actually is. Some of the pieces honestly just looked like close up clumps of hair (3:08) or balls of lint (10:19). Maybe it was a bit too random for my personal liking. Overall, it was still really cool to see just how much randomness there was, which made me think of how different randomness would be when it comes to humans vs computers. Needing random numbers in our code would be easy work for a computer–(and it would actually be random), meanwhile if I was told to choose a bunch of random numbers, I would choose them based on numbers I like and numbers that are special to me. Since I would be more focused on the significance of the number rather than its randomness, it would end up not being very random.

Going back to computer randomness, I feel like I learned a lot more about the structured potential computers have at creating arts of randomness. Take for instance the black and white squares that changed color depending on heads or tails. It looked pretty alright being that random, but just by adding symmetry, it completely transformed the look of the art, and I enjoyed that a lot more than how it was before. It made me realize that just because it’s random doesn’t mean it has to be messy.

The overall concept of randomness and chance when it comes to creating art is still a new concept to me, but I find it to be interesting, and I’m intrigued to see just how much you can do with randomness and loops combined. I would like to incorporate random color and random movement into my work because 1) I think it would be really cool to see what unexpected and/or expected results come from it and 2) all of my projects would look related if I didn’t let randomness take over. I think the right balance between total randomness and complete control is over how serious things are. In the context of Intro to IM projects, I think the freedom to allow randomness to dominate is fine for the creative visuals, while control is more necessary for coding and the order of the code. In terms of using randomness to create everything, I question just how much it would be considered art if everything stemmed from a computer’s algorithm and you having no control over it. It reminds me of the debate over whether AI art is considered art.

## Week 2 – Reading Reflection

I enjoyed Casey Reas’s talk more than I expected to, especially considering that this was the first time I had heard the idea of “randomness” and “chance” being used in an artistic context as compared to a math or probabilistic one. After I began to appreciate this notion of chance in art, I was struck by how even this is very subjective and can be used in countless ways.  One example of this is when Casey Reas talked about the concept of decision-making regarding the level of randomness incorporated into artwork. This means that artists sometimes also make conscious choices about how much of their work they leave to chance, creating “a delicate balance between order and chaos”. This also remined me of the quote by Gerhard Richter:

Above all, it’s never blind chance: it’s a chance that is always planned, but also always surprising. And I need it in order to carry on, in order to eradicate my mistakes, to destroy what I’ve worked out wrong, to introduce something different and disruptive. I’m often astonished to find how much better chance is than I am.

What I found extremely interesting about this idea was the intentionality behind randomness in art. It is about letting go of complete control but not entirely abandoning it, which can lead to unexpected, sometimes better outcomes than planned. This challenged my initial assumption that randomness in art is purely accidental and without thought. In the end, it made me contemplate: what exactly is the role of the artist? Is he still the creator of the work, or merely a medium that guides chance to reach the final piece? It also made me consider how we can use randomness not just to fill gaps but as a crucial tool for innovation and breaking away from mistakes.

One part of the talk that made it more interesting for me was the use of examples and actual works of art to illustrate this use of randomness. For instance, I found it very intriguing that something seemingly simple like the Table of Random Numbers could have such widespread use across several industries. I also liked the example of the piece “Fractal Invaders”. The idea of using a coin flip to generate art created very interesting results, but what was even more interesting was how symmetry and duplication suddenly sparks our imagination and makes us see figures in the art. It made me think that something that might initially seem highly structured or algorithmic can still engage the imagination in many ways. Overall, the talk made me rethink the creative potential of combining strict rules with the freedom of randomness, and helped me see that the “unexpected” is an important element in the artistic process.

# sandworm – circle – sin/cos wave

I begin with wanting to create a sandworm-looking creature from Dune. During my research, I found out this B&W worm that is visually more appealing than a big yellow worm hiding in the desert.

After the initial brainstorm, I started playing around with circle() & ellipse() just to experiment with the for loop. This snippet I got from one of the readings inspired me to show more of the liveness of the basic shapes.

Keeping the shape of the sandworm and the potential movement they might have in mind, I decided to create a wave. With the help of this Youtube tutorial on sin & cos wave, i was able to create a normal wave. By adding framecount into that, I create the illusion as if this sandworm is 3D. To practice using if statement, I added a colorful background that is only triggered when your mouse is moved there.

Somehow Casey Reas came in mind, so I decided to explore a bit further. For the clarity of my worm, I removed the background interaction and replaced all cos with tan. Thi si the final result:

# Code & future improvement

I am happy with how the frameCount came in handy in both the fill() & circle. In future, I would give more meaning to the background.

```for (i=0; i<width+100; i=i+1){
fill(
178+177*cos(i/2 +frameCount/2)
);
circle(i, height/2  + 100 * cos(i/100+frameCount/20), 50 * cos(i/30 + frameCount/50))

}

```

## Reading response #1: Casey Reas

View code as a tool to bring imagination to life

Reas’ website & talk.

I’m the most impressed by Casey Reas’ ability to code art from the easily overlooked details in life and how some of his works can find their roots in art history.  Every piece he presented contains multiple layers of meaning, with deep consideration before arriving at a final artwork.  Those works draw from scientific concepts, like that neuro model, or something as simple as the characters on a keyboard. They start with such tangible concepts but lands in somewhere abstract.

What sets coding art apart from traditional forms of art? I believe it’s the ability to accept constant changes. Reas references artists like Duchamp, the Dada movement, and John Cage to illustrate the concept of ‘chance in art.’ These works embrace improvisation as part of the creative process. Coding takes this a step further by having randomness at its core, demonstrating how randomness can have a certain intentionality. It shows how meanings can shift and layer as the program runs. These added-up layers can be endless, not just limited to one canvas and small changes in a code can result in something drastically different from before. Another key distinction is accessibility. Traditional art often requires specific skills and techniques, while creative coding lowers that threshold and provides the public with the tools to easily replicate a great piece of creative coding.