See this example live
The Lennard-Jones potential is a simple model describing the forces between a pair of neutral atoms or molecules.
In the graph above you can change the force as a function of distance by either changing the depth of the potential well by dragging epsilon up and down or changing the zero point for the potential by dragging sigma left and right.
Wikipedia: Lennard-Jones Potential
source: gist.github.com/gists/1338696
Modified http://mbostock.github.com/d3/d3.js to a secure url
https://mbostock.github.com/d3/d3.js