CircleSpin v0.2: Coloring Function
I tried learning how to animate SVG, but this old dog needs more time with new tricks. Instead I decided to see how I could optimize my working code further.
It turns out that I was doesn't something in a thoughtless way and when I cut that code out and generalized it into a function I had much more power. I am specifically talking about the three lines of code that colored the circles.
Originally I ran this line of code:
These lines allowed me to assign random colors for the red, green, and blue components of each circle. The value was toggled with an index I used to work through various iterations. Since there are only 256 values I can cycle through, I apply a modulus of 255 so that only 0 to 255 are used.
At this point, I decided to take that code out and turn it into a function. Here is the new function featured in circlespin v0.2.
The main advantages to using this function doesn't have to do with the lines of code. There are actually more lines of code if I want to have a unique value for each color.
I can apply independent settings for each color. If I want the circles to be more red and mute the blue and green I can do so. If I want to the blue component of the circles to change faster than the red and the green it is easy.
Here are some examples of what I have described.
Muting green and blue:
Changing the value that is cycled has strange affects on the final image. I will cycle through 205, 207, and 220 values for the red color and follow that with 100 values to show you what I see.
Cycle blue faster than other colors:
I am pleased with my accomplishments so far, but I am feeling the desire to make changes to the code and experiment to see if there are new images I can come up with.
Posted on Utopian.io - Rewarding Open Source Contributors


















Try to make a nautilus!
Please see attached notes.
nice visualization, fantastic.
Your contribution cannot be approved yet because it does not have proof of work. See the Utopian Rules. Please include the link to the commits or PRs to better outline your development.
Please edit your contribution and add proof (links, screenshots, commits, etc) of your work, to reapply for approval.
You may edit your post here, as shown below:

You can contact us on Discord.
[utopian-moderator]
wow that's beautiful illusion !!!
great job likee it!!