Puoi aprire il codice e modificare la funzione: vedi l'Help
You can open the Code and modify the function: see the Help
HELP

function f(x) { if(x<=Math.PI/2) {y=2*Math.sin(x*x)} else {y=Math.sin(x*x)}; return y }
aX = 0; bX = 3; aY = -1.5; bY = 2.5
Dx = 1/2; Dy = 1/2

// with QQ1x,QQ1y, QQ2x,QQ2y very little light red, blue

i=0; ii=0
for(j=0;j<1e5;j=j+1) {xp=Math.random()*(bX-aX)+aX; yp=Math.random()*(bY-aY)+aY
                      if(yp>0 && yp<f(xp)) {QQ2x[i]=xp; QQ2y[i]=yp; i=i+1}
                      if(yp<0 && yp>f(xp)) {QQ1x[ii]=xp; QQ1y[ii]=yp; ii=ii+1} }