This is the web version of EJS interface
EJS version 3.3

Intro Page

Designed by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    double d2; d=(xmax-xmin)/(n+1); d2=d/2; for(int i=0;i<n;i++){ XP[i]=xs[i]=x[i]=(n-i)*d; YP[i]=ys[i]=y[i]=ymax-size; dx[i]=i*d2; dy[i]=ymin-ymax-2*size; cta[i]=Math.atan2(dx[i],-dy[i]); vx[i]=vy[i]=0.; } t=0.;

    ODE

    Indep. Var. Increment
    d x[i] /dt=vx[i]
    d y[i] /dt=vy[i]
    d vx[i] /dt=g*Math.sin(2*cta[i])/2.
    d vy[i] /dt=-g*Math.cos(cta[i])*Math.cos(cta[i])
    SolverRungeKutta

    Cons Page

    if(_isPlaying() && y[n-1]<ymin)playpause(); for(int i=0;i<n;i++){ v[i]=Math.sqrt(vx[i]*vx[i]+vy[i]*vy[i]); XP[i]=xs[i]+v[i]; YP[i]=y[i]; U[i]=m*g*y[i]; K[i]=m*v[i]*v[i]/2; KY[i]=v[i]*v[i]/(2*g); }
    public void playpause () { if(label==l_play){ label=l_pause; _play(); }else{ label=l_play; _pause(); } }
    public double getA (int i,double[] c) { if(i==0)return -g; else return -g*Math.sin(c[i])*Math.sin(c[i]); }
    Array