At the beginning, I planned to simplify the Week 3 assignment code (triangles appearing with mouse movement) by using loops and doubling the number of triangles. However, I struggled to understand the relationships between triangles, so I tried replacing them with triangles formed by intersecting lines. This approach, unfortunately, prevented the triangles from changing color based on mouse position. Eventually, I gave up this idea and created a repeating pattern using the pine trees I had drawn in Week 2.
My attempt to replace triangles with lines was a little bit risky I realized. I should have outlined the structure of code and functions I needed (some of which I thought existed but didn’t) before starting.
https://editor.p5js.org/Siming2024/sketches/GLf2iWPTm
https://editor.p5js.org/Siming2024/sketches/B-JtXvW41
Final version