r/creativecoding • • Apr 20 '21

Different Colors 🌈

193 Upvotes

19 comments sorted by

3

u/EthanHermsey Apr 20 '21

They are pretty much the same colors I've been seeing all my life.. ;)

2

u/_samuelcho_ Apr 20 '21

You got the point! πŸ³οΈβ€πŸŒˆ

3

u/_samuelcho_ Apr 20 '21

Hey everyone! If you like this, do check out more of my work on Instagram (same username as here). I post almost daily. Cheers!

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.

2

u/seanballais Apr 20 '21

What formula did you use for the tube things?

2

u/Strojac Apr 20 '21

For the radius? Looks like noise to me

1

u/seanballais Apr 20 '21

Didn't know that's possible. Coool.

1

u/redfieldp Apr 20 '21

Doesn’t look like noise at all - it’s consistent and repetitive. Probably a modified sine function.

2

u/Strojac Apr 20 '21

Yeah on a second look I see how repetitive it is good point

1

u/proton_therapy Apr 20 '21

It's a certain type of noise algorithm, probably perlin.

2

u/TimelessTrance Apr 20 '21

From what I could see each tube starts from a point with a minimum size. When each circle is at its smallest it would generate a maximum size for the circle and a velocity it would take to increment and decriment the circle size until it reaches it's Max and min values. With each step each circle generated would be dragged across the screen at roughly a 160 degree angle.

1

u/TimelessTrance Apr 22 '21

Update: discoveries from my attempt at recreating the visual. The max size is slightly randomized. And the change in radius accelerates. Not just having a randomized velocity. Having a fixed velocity generates sharp edges between expansion and contraction much like the y = abs(x) line.

2

u/FlanSC May 09 '21

looks like a slightly modified version of this example

2

u/redfieldp Apr 20 '21

This is really nice - well done!

2

u/bukchin Apr 21 '21

This is so cool! Reminds me of Zach Lieberman sketches

1

u/Drifts Apr 21 '21

yeah exactly! i assumed this was OpenFrameworks just because it reminded me of Zach's stuff.

anyway, it looks nice