It was time to get started with p5.js!
This is the first Coding Challenge on ‘The Coding Train’. The Starfield.
This is Daniels version of it. You should subscribe, he’s just a fun guy to watch.
While I’ve used html canvas before and written a few things that have used it, I have not used a library intended for it. So mostly this, and I imagine a few more of these challenges, will be for learning the basics of the library.
This implementation was of a super simple particle system with ellipses drawn to canvas. This is 2D so the Z is only mathematical control for scale and zoom/speed effect.
Daniel then drew lines between points to show the zoom in processing. I opted to just let the ‘background’ take care of this effect with an alpha setting. Granted this does show the ellipses separated when the ‘zoom’ speed is too great. But I can live with that as the effect is still there. I may come back and revisit this with the line design that Daniel used.
As always a thanks to Daniel for the motivation and inspiration!