Animate a pendulum: Difference between revisions
→Within SVG: adding xmlns attribute
(→Within SVG: use Array.from in rk4) |
(→Within SVG: adding xmlns attribute) |
||
Line 2,383:
Also we'll use a dimensionless formulation of the problem (taking unit value for the mass, the length and so on).
<lang javascript><svg height="100%" width="100%" viewBox="-2 0 4 4" xmlns="http://www.w3.org/2000/svg">
<line id="string" x1="0" y1="0" x2="1" y2="0" stroke="grey" stroke-width="0.05" />
<circle id="ball" cx="0" cy="0" r="0.1" fill="black" />
|