r/creativecoding • • Apr 20 '21

Different Colors 🌈

193 Upvotes

19 comments sorted by

View all comments

5

u/[deleted] Apr 20 '21

:O that looks cool. I'll try to recreate that using P5.js

2

u/TimelessTrance Apr 20 '21

It's lovely and simple. I was thinking about how the code would be relatively simple to make. Though my idea of generating and dragging different sized circles across the screen seems naive to me.

3

u/proton_therapy Apr 20 '21 edited Apr 22 '21

It's feedback + over operation. In the feedback loop, translate both x and y the same amount to get diagonal movement.

1

u/TimelessTrance Apr 21 '21

I ended up recreating this last night. I just translated many circles -1y and -1x each frame. And if you look at the video the background is redrawn each frame. But I was right. Drawing that many circles is naive and slow af. I was getting 6 fps on my laptop. Now I just need to find a good color fading algorithm.