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

WeChat81868c801f270e7dcfea3627be02e698.jpg

https://editor.p5js.org/Siming2024/sketches/B-JtXvW41

       Final version

WeChat918ace3a625967010a1173dceb225b84.jpg

WeChat8c55a9c990793e195de8fd98d394b380.jpg

542121727924652_.pic.jpg

6191727921377_.pic.jpg

6201727924490_.pic.jpg

6221727925207_.pic.jpg