Show HN: Giving a 2D grid a 3D look – part 3
victorribeiro.com
victorribeiro.com
Today I was looking at some cool retro synthwave graphics [1] and I got inspired.
To achieve this I'm measuring the distance of each column of points to the center of the grid and giving it a random height the decreases as it approaches the center. After a row of points have passed a z value (went outside of view) I pop them, reset their z position (depth) and give it a new y positions. This way I'm creating an endless loop of mountains. I also use the z distance to color the grid in this beautiful blue to red gradient with an alpha value (so the mountains fade in instead of just appearing out of nowhere).
Well, I hope you like it.
Part 1 - https://victorribeiro.com/random
Part 2 - https://victorribeiro.com/random2
1 - https://www.google.com/search?q=retro+synth+graphics&sxsrf=A...