Week 2 – Assignment – Geometric Panels

The assignment for this week was to use concepts of conditional statements and loops to produce a simple work of art. I initially decided to build upon the example of nested loops discussed in class to create an illusion using squares. This includes three nested ‘for’ loops for the pattern to repeat along the x and y coordinates and result in the decreasing size of the squares. To make it more visually appealing, the random function has been used within fill() creating a colorful effect.

https://editor.p5js.org/rujulm/sketches/K0Ubc62Yn

I decided to further explore the functions with something more challenging. This is when I thought of trying to replicate the design of the geometric panels of the Al Bahar Towers in Abu Dhabi. Built to combat the harsh weather in the UAE, these computerized panels are built with a technology that allows them to detect the position of the sun and open and close accordingly, thus reducing the amount of heat absorbed.


To create a similar geometric design, I began by sketching a pattern based on a 400×400 canvas size. This helped me estimate the coordinates to get the exact shape.


The entire design has been made using a combination of triangles of different sizes. I have used two separate nested loops to implement the inversion of the triangles.

for (let x=0 ; x<=width ; x+=100){
    fill(209,192,20,mouseX);
    
    for (let y=100 ; y<=height ; y+=100)
      //The if condition is used to alter the coordinates of the triangles depending on the row
      
      if (y==100 || y==300){ //executes for first and third row
        triangle(x-50,y,x,y-100,x,y-30);
        triangle(x+50,y,x,y-100,x,y-30);
        triangle(x-50,y,x,y-30,x+50,y);
      } else { //executes for second and fourth row
        triangle(x,y,x+50,y-100,x+50,y-30);
        triangle(x+100,y,x+50,y-100,x+50,y-30);
        triangle(x,y,x+50,y-30,x+100,y);
      }
  }
  
//The second for loop given below works exactly like the first one and has been used to create the inverted triangles
  
  for (let x=0 ; x<=width ; x+=100){
    fill(205,175,64,mouseX);
    
    for (let y=100 ; y<=height ; y+=100)
      if (y==100 || y==300){
        triangle(x+50,y,x,y-100,x+50,y-70);
        triangle(x+50,y,x+100,y-100,x+50,y-70);
        triangle(x,y-100,x+50,y-70,x+100,y-100);
      } else {
        triangle(x,y,x-50,y-100,x,y-70);
        triangle(x,y,x+50,y-100,x,y-70);
        triangle(x-50,y-100,x,y-70,x+50,y-100);
      }
  }

To make it more realistic, I wanted to include both the closed and open images of the panels. I have done this using the built-in Boolean variable mouseIsPressed, such that when the mouse is clicked a different view of the building is visible, as would be seen once the sun sets. I have also used the mouseX variable to change the opacity of the triangles, giving the panels a glistening effect.

I thoroughly enjoyed doing this assignment and feel that I have achieved what I had initially imagined. Reflecting on the possible improvements, I want to discover new ways to include more interactivity such that the user can choose the panels to be closed using the movement of the mouse.

Assignment 2: The Moving dot

Concept:

When I saw animation and art I thought of how a point from a pen-ball or a dot from the tip of a brush can be manipulated to create beautiful artworks so I decided to recreate this.

Highlight:

Deciding on the artwork was challenging until I thought of my name. I don’t know where I would end with this brush tip but I would love for my first work of art to be my name. I decided to create a kind of intro to my first assignment using this idea.

Every artwork is made of lines and curves so I had to discover how to use my brush tip to create these. The line creation was very simple but the curves was a challenge. Initially I was thinking of just drawing curves as a whole using the arc function but then that would mean I am going against my words to use the brush tip idea. 

After watching some videos (https://youtu.be/uRd5iKBpsUA?si=4025fr-zmeL18zha) I was able to find a way to make this possible. This part of the art is what took most of my time. After getting these, I started to draw. 

if(r4==true){
     a=220+sin(angle3)*55;
     b=290+cos(angle3)*80;
     circle(a,b,10);
     angle3+=speed;
     if(a<225){
       r4=false;
     }

 

The most challenging part of my work was joining a line and curve as I had to calculate the angle but this made me appreciate my work the more because, a slight change in the angle ruins the whole piece. 

Art:

At the end of the intro I just decided to add my portrait but spice it up a bit by adding some form of simple animation.

Reflection and Ideas for Future Work:

After completing my first artwork, I plan to draw something else using my brush tip . I hope to find better was of drawing curves such that slight change in angle will not affect my work and maybe add the element of randomness to see the unique arts that will be created by the computer.

Casey Reas Chance Operations Reflection.

Casey Reas’ speech on chance operations highlights randomness, chance and order in art and explores the interplay of chaos and control in the creative process. He discusses how incorporating randomness and chance elements into art can lead to unexpected and exciting outcomes, challenging traditional notions of artistic control. He introduces chance in art as a form of chaos and destruction of an order society and this resonated with me because it expresses the escape I feel when I do interactive coding through IM as opposed to standard coding in Computer Science. I get to “replace logical nonsense of men with logical nonsense”. This chance in art opens pathways that allow for you to take full creative control in your coding, and it is heavily emphasized in his speech through his countless mentions of randomness which is a function that allows for imprecision and parametrized change to create art.

Reas also highlights the importance of setting up systems and rules within which randomness can operate. This controlled chaos allows artists to introduce an element of surprise and unpredictability into their work. It’s about relinquishing some level of control and letting the process itself become a collaborator in the creation of art.

On the other hand, he also touches on the idea that order can emerge from chaos. Through precision and exploration of the grid, even when randomness is a part of the creative process, patterns and structure can arise, creating a balance between chaos and order.  Referred to as order in art, though not the exact opposite of chance in art, this dynamic tension between randomness and order can result in art that is both visually striking and conceptually rich.

In short Casey Reas’ speech highlights the value of embracing randomness and chance as tools for artistic exploration and encourages artists to break free from rigid constraints and discover the beauty that can emerge from the unexpected.

Assignment 2 – “Abstract art”

My concept

My concept was to create my version of abstract art of shades of blue, with one shade of maroon to counter the other colors. As I became more accustomed to coding and following what I’ve learned during class, I tried to implement the bouncing ball element, also added the concepts of conditional statements such as loops and if statements.

I tried to find a way that I could make the dark turquoise ball leave traces of its position on the canvas, but i was not successful in that, therefore I eventually just left it as it is.

A highlight of some code that you’re particularly proud of

I am proud of this part of my code which I am proud of because I was having trouble with how to make the ball bounce back, I eventually understood the if statement and how it works, as it was initially challenging for me.

   //to make the ball bounce back the opposite side
    
 if(circleA < 0 || circleA > width) 
    speedA = speedA * -1;
     
  }

  //  to make the ball bounce back the top to bottom
  
{
    if(circleY < 0 || circleY > height) {
    speedY = speedY * -1; 
      fill(25,23,22);

 

Embedded code

// state
let circleX = 100;
let circleY = 0;
let speedX = 10;
let speedY = 8;
let circleA= 100;
let circleB=400;
let speedA= 4;
let speedB= 8;
let a = 50;



function setup() {
  createCanvas(450, 450);
}

function draw() {
  
  background(204,255,229);
  fill(90,153,153)
  rect(250,202,300);
  noFill();
  fill(210,255,255);
  rect(0,202,300);
  noStroke();
  
  {//for loop
    for (let x = 0; x < 8; x += 2) { // same as x = x + 2
     fill(229,255,204)
    circle(a * x + 25, height / 2, a, a);
    circle(width / 2, a * x + 25, a, a);
  noStroke()
    }
  }

  // Frame based on state
  fill(0,102,102) //color of circle X,Y
  circle(circleX, circleY, 50);
  fill(102,0,0); //color of circle B,A
    circle(circleB, circleA, 50);
    fill(255,202,204)

 

  
  circleX = circleX + speedX;
  circleY = circleY + speedY;
  circleA=circleA+speedA;
 


  
  //make the ball bounce from left to right
  {
    if(circleX < 0 || circleX > width) 
    speedX = speedX * -1; 
  }
    {
      //to make the ball bounce back the opposite side
     if(circleA < 0 || circleA > width) 
    speedA = speedA * -1;
     
  }

  //  to make the ball bounce back the top to bottom
  {
    if(circleY < 0 || circleY > height) {
    speedY = speedY * -1; 
      fill(25,23,22); 
    }
    {
      
     
    }
}
}
  • Reflection and ideas for future work or improvements

What I think is most important at this moment is that I have to have more knowledge on how i can transform the ideas in my head into reality through coding. This assignment took more time than it should have because at first, i was partially confused about how things work and how they are going to be executed. Practicing and understanding fully how to write more precise and cohesive coding would be my goal to reach, nonetheless, i enjoyed creating this assignment.


Editable link:

https://editor.p5js.org/mka413/sketches/r-RMAvSOJ

Loop Portrait Assignment 2

This project was inspired by the grid-like patterns formed by concrete tiles around campus, which sometimes appeared curved when seen from a particular angle.

This resemblance to gentle ocean waves led me to delve into generative art. A search for “moving loop art” introduced me to Perlin noise flow fields, which were a significant source of inspiration for this creative endeavor. Combining these elements resulted in the generative art piece I created.

To start, I created a grid of squares using a simple for-loop. My aim was to make this static grid interactive, giving it the appearance of waves when the mouse cursor passed over it. Achieving this effect was both captivating and challenging. To mimic the motion of waves, I used trigonometric functions like sine and cosine. This part of the code was particularly interesting because it required me to use insights from sine and cosine graphs to estimate how each square should move.

The starting position of the circular motion of the squares would change direction depending on the mouse’s position, either clockwise or counterclockwise. The combination of Perlin noise-inspired flow fields and trigonometric functions brought the concept to life. It created the illusion of waves moving through the grid of squares as the mouse moved. The interaction between sine and cosine functions, along with Perlin noise-inspired angles, resulted in a visually captivating effect, making it seem as if the squares were moving together in a harmonious wave-like dance.

An essential part of achieving this, was a piece of code I referred to here. It provided helpful guidance for developing this project. The highlight of my code then follows below:

 
//starting position based on mouse position
const xAngle = map(mouseX, 0, width, -4 * PI, 4 * PI, true);
const yAngle = map(mouseY, 0, height, -4 * PI, 4 * PI, true);

//varying square positions
const angle = xAngle * (x / width) + yAngle * (y / height);

//circular motion for each particle
const X = x + 10 * cos(2 * PI * t + angle);
const Y = y + 60 * sin(2 * PI * t + angle);

square(X,Y,50);

Here’s an embedded sketch of my work:

The color of the squares was another dynamic aspect of the artwork. It changed in real-time based on the mouse cursor’s position, creating a colorful and interactive visual experience. This dynamic color variation added depth and engagement to the piece.

Reflecting on this artwork, it’s a variation of what I initially had in mind. Although I didn’t have precise expectations, I had a general concept. In future iterations, I plan to explore individual squares with different colors, creating a generative storytelling narrative. Perhaps the art could start with a single square and gradually build into a full canvas, conveying a visual story. Regardless of the directions I may explore in the future, I take pride in what I’ve accomplished with this piece. It fuels my excitement to continue learning and applying my newfound skills to real-life works of art.

Reading Reflection – Week#2

Casey Reas stands out not only for his artistic prowess but also for his extraordinary creativity. His work serves as a testament to his ability to push the boundaries of traditional artistic expressions and explore the intricate interplay between chance and order. From my perspective, machines are an ideal platform for unraveling the complex relationship between these two seemingly opposing forces.

Reas’ examples vividly illustrate how chance and order coexist harmoniously within the realm of code and machines. His artistry delves into the inner workings of algorithms, a domain often associated with rigid orderliness. Yet, within this structured framework, he manages to unleash the untamed power of randomness. Through the careful orchestration of algorithms, Reas reveals hidden patterns within chaos, offering a glimpse into the hidden harmony that underlies our seemingly chaotic world.

In conclusion, Casey Reas’ video presentations and artistic endeavors provide not only inspiring but also thought-provoking insights into the dynamic interplay of chance, order, and technology within the realm of art. His work encourages us to reconsider our preconceived notions about chaos and structure, inviting us to explore the fascinating territory where they converge. Through Reas’ pioneering work, we gain a deeper appreciation for the intricate dance between chance and order that shapes our world and enriches our understanding of art and creativity.

Reading Reflection – Week 2

Casey Reas’s presentation provided a captivating exploration of the intricate relationship between randomness, computing, and art. His presentation invited us to question our fundamental assumptions about the inner workings of computing, the role of software, and how these concepts intertwine with diverse hardware platforms.

The heart of Reas’s talk in my perspective lay in his ongoing work over the past two and a half years, a collaborative project with esteemed authors. Through this project, Reas explored the 10-print algorithm outside the constraints of the Commodore 64’s hardware. This journey led him into the realm of Processing, where randomness took center stage.

One of the key takeaways was the revelation that in Processing, the entire image updates simultaneously, a stark contrast to the Commodore 64’s incremental character-based updates. This shift enabled Reas to manipulate randomness, adjust probabilities, control line thickness, and experiment with frame rates. These subtle alterations profoundly affected our perception of the generated art.

As the project progressed, Reas and his collaborators delved deeper into the creative potential of randomness. They introduced diverse color palettes, harnessed randomness to dictate the number of rows and line thickness, and unveiled a delicate balance between structure and serendipity driven by random values.

Reas’s talk culminated with a glimpse into his ambitious “Century” project. This ongoing endeavor aims to encapsulate a century of visual art by pixelating specific artists’ works and exposing the underlying algorithms. Users can interact with the piece, freezing frames and modifying parameters, providing a unique window into a century of artistic innovation.

What struck me most about Reas’s work was the juxtaposition of simplicity and complexity. His graphics, while minimalistic and seemingly primitive, encourage closer examination, revealing the intricate interplay of algorithms. “Century” serves as a testament to how random processes can yield profound insights and unique perspectives, all within the digital realm.

Casey Reas’s speech illuminated the potential of randomness in computing to generate art that defies conventions and provides new perspectives on creativity, technology, and the interplay between the two. His work stands as a testament to the limitless possibilities that arise when we explore the convergence of computing and randomness in the world of art.

Week 2 – Reading/Video Reflection

Casey Reas’ video on chance operations provides insights into the role of chance and randomness in new media and art. While the emergence of chance in art was seen as a significant development through the dadaist, surrealist, and futurist movements of the early 20th century as a way of challenging the rational, ordered way of life, it is now a widely accepted and even popular form of art-making in today’s landscape.

I was fascinated by the distinction between randomness and order. Both, though completely opposite in my opinion, pave the way for modern art seen currently. Straying further away from the “naturalist” Renaissance paintings, both chaotic and mind-bending images, as well as grid-like ordered images, are the visuals of today. It was also very interesting when he brought Rosalind Krauss’ critique of the presence of such grid-like images in modern galleries. I personally feel that they are important both aesthetically and metaphorically, serving as a yin-yang to the chaos of generative art. The idea of duplication leading to order from randomness and the concept of symmetry is a very human-oriented perception of the world, and it feels like it has a much deeper rooted relation to us. As such, I don’t find such grid-like images to be devoid of humanity.

I found the video inspiring in multiple ways, particularly in how art can take different directions going forward. Upon further research, I discovered that Reas co-created Processing itself. His insights on the philosophy of generative art and chance operations kept me pondering the various ways nature can be represented in media.

Assignment 2 – NOWISWHENWEARE p5.js Installation

Concept

The concept for my code was heavily inspired by the lighting and sound installation NOWISWHENWEARE by Andrew Schneider. After witnessing his installation multiple times over the last two weeks, I was inspired to create a floating grid that encapsulates the feeling of stars in the same way his installation did. While creating the animation, I was also reminded of and inspired by the early prototype computer graphics made by NASA and connected the imagery of a rotating space shuttle (I can’t remember which documentary I had watched it on) to the grid with sparkling stars.

After the rotating box was set, the sparkling stars were meant to represent the floating LED lights in Schneider’s installation. A constantly changing background hue was added to add dynamics, as well as a vintage, spacey color palette.

Highlight

for (let i = 0; i < numSpheres; i++) {
   x = random(-boxSize, boxSize);
   y = random(-boxSize, boxSize);
   z = random(-boxSize, boxSize);
   push();
   translate(x, y, z);
   sphere(boxSize / 500);
   pop();
 }

The highlight of the code, besides using the bouncing ball logic to change the background color, was creating the sparkling stars.

Using the aforementioned for loop in a WEBGL environment, I was able to instantiate a 3D grid of random sparkling stars.

Using push pop and translate functionality, I was able to save and restore values for each sphere on the grid. This allowed them to stay within the constraints of -boxSize to +boxSize, creating the illusion of being suspended in the box itself.

Reflection

I would love to add sounds to the animation, much like Andrew Schneider’s installation. Implementing a mouseX functionality that acts like the lanyard beeper present during guided tours would be a great next step to make dynamic changes in the 3D grid itself. Honestly, creating a 3D projection of this would be great as well, but I have no idea how to do that yet.

 

NYC, The City That Never Sleeps

Concept

In this assignment, I used loops and basic functions to show the hectic, vibrant, and bustling nightlife of New York City. I wanted to express how I felt when I saw the night sky view of NYC.

21 Best Views In NYC At Night To Take In A Manhattan Skyline View

I was captured by NYC’s iconic skyline, which is illuminated by countless skyscrapers, billboards, and streetlights. The city’s streets and buildings are bathed in a sea of lights, creating a dazzling and energetic atmosphere. Times Square, in particular, is known for its vibrant, neon-lit signs and bustling nightlife.

Even the moon is vibrantly moving in NYC. The night view of NYC is indeed hectic, but it’s also a unique and exciting experience for visitors and residents alike. When I saw numerous buildings in the skyline, I felt that not only New Yorkers, but everything in NYC kept changing. The city’s energy and vibrancy come to life after dark, offering a wide range of activities and entertainment options to suit every taste.

The highlight of My Code

// Draw cityscape buildings
 fill(100); // Building color
 for (let x = 50; x < width; x += 100) {
   let buildingHeight = random(100, 300);
   rect(x, height - buildingHeight, 80, buildingHeight);
   // Windows in buildings
   for (let y = height - buildingHeight + 20; y < height - 20; y += 40) {
     for (let i = x + 10; i < x + 80; i += 20) {
       fill(random(0,200, 255), random(0,200, 255), 0); // Random yellowish lights
       rect(i, y, 10, 10);
     }
   }
 }

The code then enters a nested loop structure using two “for” loops:

  1. The outer loop, for (let x = 50; x < width; x += 100), iterates horizontally across the canvas starting at x = 50 and continuing until it reaches the canvas width. This loop defines the x-coordinate of the buildings, with a gap of 100 pixels between each building.
  2. Inside the outer loop, there’s an inner loop: for (let y = height - buildingHeight + 20; y < height - 20; y += 40). This inner loop iterates vertically within each building. It starts at a height just above the building’s base and ends just below the top edge of the building. It defines the y-coordinate for the windows, with a gap of 40 pixels between each row of windows.

Furthermore, fill(random(0,200, 255), random(0,200, 255), 0); this line sets the fill color for each window to a random yellowish color. The random() function is used to generate random values for the red (0-255), green (0-200), and blue (0) components of the color, creating a range of yellowish shades. The 0 in the fill() function is for the blue component, making the color closer to yellow.

The combination of these loops and drawing commands results in a cityscape with randomly sized buildings and rows of randomly colored windows, giving the appearance of city lights in the evening.

Reflection and Ideas for Future Work

There are several ways to enhance this artwork. For instance, I could add more complex building shapes, introduce different lighting effects, or simulate perspective to create a more three-dimensional look. Also, I will design a cityscape that can potentially convey a narrative or mood next time. I could add New Yorkers in these buildings, adjust the colors, or arrangement of windows to evoke specific emotions and tell a story about the city and its inhabitants.