I want to make something like ideal gas model. I need to fill container with ~100 small circle. Then I want to animate them and stuff.
So, how to fill container with circles with random coordinates? 🤔
You can either use canvas to draw some circles or can use div with property border-radius as 50% to create circles with random radius at random positions within a fixed area.
Here's a code I had created while learning JS. It creates 10 random circles. Obviously, gas molecules won't be that big but that can be managed by decreasing range of random for radius. Furthermore you can ignore( lengthy code) inter-molecule collisions.
Edit: I forgot to mention my code.
Here it is: