# Week 2: A Simple Work of Art

Concept:

Initially, I began with an uncertain direction for my generative art piece, starting with a simple sketch that lacked a clear vision.

And then I added some texts.

As I experimented with shapes and transitions, I stumbled upon the idea of creating an inspiring quote for myself. At the time, only three weeks into the semester, I was juggling numerous responsibilities and wanted this artwork to serve as a motivational reminder to persevere during moments of overwhelm.

Highlighted Code:

I am proud of my implementation of a dynamic gradient background. It was a challenging task to control color transitions at specific interpolation points to ensure a smooth shift between soft and soothing colors.

```// A function to draw the background
function drawBackground() {
// initialize the colors of the gradience
begin = color("#FFC3A0");
finish = color("#A4C3E1");

let r = map(sin(angle0), -1, 1, 180, 255);
let g = map(cos(angle0), -1, 1, 180, 255);
let b = map(sin(angle0 * 2), -1, 1, 180, 255);
begin = color(r, g, b);

angle0 += 0.05;

// loop through the canvas height from top to bottom
for (let i = 0; i < height; i++) {
// calculate the constant range of change based on the current vertical position
let change = map(i, 0, height, 0, 1);

// to make a smooth color change, interpolate between the starting and the ending colors
let color = lerpColor(begin, finish, change);
stroke(color);           // set the color for the current row

line(0, i, width, i);     // draw a horizontal line with given color stroke
}
}
```

Also, I’m satisfied with the overall code structure, which incorporates the use of global and local variables, functions, and an object-oriented programming design.

Embedded Sketch:

Reflection and Ideas for Future Work:

For the next projects, I would aim to enhance the visual appeal of my artwork by planning the design more meticulously before diving into implementation. This thoughtful approach will likely result in a more meaningful and aesthetically pleasing final product. Also, I want to introduce more interactivity to make the artwork more engaging and fun for the audience.