Look at the image above. It is generated by code, probably in a few seconds.
If you were to replicate it, how would you go about doing it? Well, if you were given this task, you would look closely, and define certain details:
- Each single unit is a tiny square.
- There are not unlimited, in other words, there is a set number. After all, if it were unlimited, then we would pretty much just have a big black square, right?
- They have very thin borders.
- Each square is positioned randomly.
These are the problems you face. What are the tools you need? If you run through the following references, you will be ready to perfectly replicate the image above.
When you are done and have a working example, put your code in the comments, post it to Instagram, and tag @paulhoets. Or just kakao it to me. That’s, like, cool also…
Need the answer? Working code can be found here
Paul Hoets is a freelance maker who lives in South Korea. If you liked this article and would like to contribute to his empire of dirt, silicon and tech. education, buy him a coffee!