G9 Sine Frequency

We improve on G9 Sine Wave by dragging to change frequency. See more G9 Demos

const initialData = { a:30, f:2.5 } const sin = Math.sin const render = ({a,f}, c) => { c.text('f = '+f.toFixed(2),-120,-50) for (let t=-100; t<100; t++) { const fill = (t+100)%10<5?'black':'red' c.point(5*t/f, a*sin(t/10), {fill}) } }

//wiki.ralfbarkow.ch/assets/pages/g9-demos/run-g9.html HEIGHT 160