Can we solve initial conditions for a periodic function? If this works, we might try a simulation. See G9 Demos
const initialData = { a:30, p:0 } const sin = Math.sin const render = ({a,p}, c) => { c.text('p = '+p.toFixed(2),-120,-50) for (let t=-100; t<100; t++) { const fill = (t+100)%10<5?'black':'red' c.point(2*t+p*150, a*sin(t/10), {fill}) } }
http://ward.dojo.fed.wiki/assets/pages/g9-demos/run-g9.html HEIGHT 160
A sin wave is characterized by three numbers: amplitude, frequency and phase. This means that screen coordinates, x and y, have insufficient requisite variety to fully adjust such a wave.