Ok, I'm confused. Why isn't energy conserved and does the pendulum eventually stop?
xxxxxxxxxx
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/4.8.0/d3.min.js"></script>
<script src="//unpkg.com/d3-force-constant"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<svg id="canvas" width="100%" height="100%">
<line id="wire-el" stroke="slategray"></line>
<circle id="ball-el" r="15" fill="midnightblue"></circle>
</svg>
<script src="index.js"></script>
</body>
https://cdnjs.cloudflare.com/ajax/libs/d3/4.8.0/d3.min.js
https://unpkg.com/d3-force-constant