Concept
I looked throught some of the old computerarts provided and some of the organized and innerric graphs reminded me of the golden curve and the related math arts that I have seen. I remembered that the seeds of the sunflower followed a certain mathematical pattern and decided to use that as the model for my computer art.
I did use AI in this assignment to understand the pattern and mathematical logic the sunflower seeds followed, and to figure out some basic formulas that would allow me to recreate such shapes, but the codes were my own.
Code chunk
for (let pointn = 0; c * sqrt(pointn) <= 150; pointn++) {
let angle = pointn * 137.5;
let x = c * sqrt(pointn) * cos(angle);
let y = c * sqrt(pointn) * sin(angle);
//The code can be played with using many math functions, I tried some and attached them below
//without sqrt
//let x = (c * (pointn)/10) * cos(angle);
//let y = (c * (pointn)/10) * sin(angle);
// logarith(also looks good when made 1*c)
// let x =5*c * log(pointn) * cos(angle);
// let y =5*c * log(pointn) * sin(angle);
//1/log
// let x =100*c * 1/log(pointn) * cos(angle);
// let y =100*c * 1/log(pointn) * sin(angle);
let r = map(x, -300, 300, 80, 255);
let g = map(y, -300, 300, 80, 255);
noStroke()
fill(r, g, (r + g) / 1.65);
circle(x, y, 3);
The full code is relatively short so I picked the for loop section because I think it shows exactly what loops are helpful for. This chunk of code greatly utalizes the efficency of loops. It would be extremely difficult and time consuming to draw all the dots with accurate spacing by repeated lines of code. The for loop allows drawing and editing of the dots in one line, making it much easier. I also thouht it is intereating that I am able to create different patterns using only change in the mathematical function and slight adjustment to numbers, so I included those modified codes as well.
I was able to recreate the sunflower pattern in resting first, but I thought it looked a bit dull. Because it was a round pattern and included curves, I decided to make it rotate around the center to have a bit of a dillusional effect. I looked up a video tutorial on youtube and learned how to move start point to the center of the canvas and how to rotate it. The effect is pretty good.
Reflection
Drawing a mathematical pattern probably does not really fit the requirement of doing computer art, but I believe the Fibonacci numbers and its related curves do all look quite artistic, and the massive amount of dots needed is an excellent medium for praticing loops. My finished work seems a bit easy and a bit short for an assignment, and I might decide to try something more complicated and in accordance with class difficulties in future assignments.
Another thing is that AI really is quite helpful in the case of understanding scientific or math related concepts. I wouldn’t have been able to figure out all the formulas myself. I will attach my conversation with Gemini in the reference section
References
- https://www.youtube.com/watch?v=i5bs3SPpHdM
- https://www.youtube.com/watch?v=z9d1mxgZ0ag
- https://www.youtube.com/watch?v=3U8-9_WeuKE
- https://www.youtube.com/watch?v=_GkxCIW46to
- https://gemini.google.com/share/4c9531505d04