Simulation of attraction-of-opposites particles, similar to the interaction between protons and electrons.
Uses D3's force plugin forceMagnetic to simulate the asymmetrical attraction/repulsion of objects in an inverse-square relationship with distance. Further, particles are prevented from overlapping by applying a non-elastic collision force using forceBounce.
Using the slider controls you can add/remove particles to the system, and regulate the ratio of positive (+) vs negative (-) particles.
forked from vasturiano's block: Plasma
https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.2/d3.min.js
https://unpkg.com/d3-force-bounce
https://unpkg.com/d3-force-surface
https://unpkg.com/d3-force-magnetic