This is the web version of EJS interface
EJS version 4.1
  1. Author=Fu-Kwun Hwang - Dept. of Physics, National Taiwan Normal Univ.
  2. Abstract=hwang@phy.ntnu.edu.tw
  3. CaptureTools=true
  4. DataTools=true
  5. LanguageTools=true
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    ci=cia*pi/180.; for(int i=0;i<n;i++){ T=1./(f1+i*df); L[i]=g*T*T/(pi2*pi2); x[i]=xmin+(i+0.5)*range/n; omega[i]=0.; pn2[i][0]=x[i]; pn2[i][1]=0; if(mode==0){ ztop[i]=zmax; cta[i]=ci; pn2[i][1]=0; pn2[i][2]=zmax; }else{ y[i]=cst*d; z[i]=zb; ztop[i]=zb+cst*Math.sqrt(L[i]*L[i]-d*d); cta[i]=Math.asin(d/L[i]); pn2[i][2]=ztop[i]; } pn[i][0]=x[i]; } setview(); dt=0.01*tcst; w=2*pi*f1;

    Evol Page

    Indep. Var. Increment
    d cta[i] /dt=omega[i]
    d omega[i] /dt=-g*Math.sin(cta[i])/L[i]
    SolverRungeKuttaTolerance=0.001
    for(int i=0;i<n;i++){ y[i]=cst*L[i]*Math.sin(cta[i]); z[i]=ztop[i]-cst*L[i]*Math.cos(cta[i]); dy[i]=cst*L[i]*Math.sin(cta[i]); dz[i]=-cst*L[i]*Math.cos(cta[i]); pn[i][1]=y[i]; pn[i][2]=z[i]; } msg="time="+ ((int)(t*100))/100.+"s";
    dx=xmax/ns; for(int i=0;i<ns;i++){ px[i]=i*dx; py[i]=Math.sin(k*px[i]-w*t); }

    setview

    public void setview () { sc=0; for(int i=0;i<n;i++){ if(skip>0){ if(sc>0 && sc<skip){ view[i]=false; }else{ view[i]=true; sc=0; } sc++; }else view[i]=true; } }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double,int,double,int,double,int
    title="Frame"
    layout=border
    visible=true
    location="73,51"
    size="582,586"
    position=center
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    minimumZ=zmin
    maximumZ=zmax
    cameraAzimuth=6.359999999999963
    cameraAltitude=0.3500000000000001
    cameraFocusX=0.0
    cameraFocusY=0.0
    cameraFocusZ=0.0
    cameraRotation=0.0
    cameraDistanceToScreen=5.0
    numberOfElements=n
    x=x
    y=y
    z=z
    sizeX=size
    sizeY=size
    sizeZ=size
    visible=view
    numberOfElements=n
    x=x
    y=0
    z=ztop
    sizeX=0
    sizeY=dy
    sizeZ=dz
    visible=view
    lineColor=128,128,128,128
    data=pn
    visible=viewtrace
    closed=false
    x=0
    y=0
    z=zmax*1.2
    text=%msg%
    font=Monospaced,BOLD,20
    x=xmin
    y=0
    z=ztop[0]
    sizeX=xmax-xmin
    sizeY=0
    sizeZ=ztop[n-1]-ztop[0]
    visible=false
    lineWidth=5
    data=pn2
    closed=false
    lineWidth=stroke
    firstDirection=da
    secondDirection=db
    sizeX=range
    sizeY=range
    lineColor=200,220,208,128
    fillColor=200,220,208,128
    position=south
    layout=VBOX
    position=north
    layout=HBOX
    position=center
    variable=d
    minimum=0.001
    maximum=0.015
    format="d=0.000"
    enabled=mode==1 && _isPaused()
    dragaction=_initialize()
    variable=cia
    minimum=0.0
    maximum=30.0
    format="ctai=0.0"
    enabled=_isPaused() && mode==0
    dragaction=_initialize()
    variable=tcst
    minimum=0.01
    maximum=0.1
    format="time scale=0.00"
    dragaction=dt=0.01*tcst;
    layout=GRID:0,1,0,0
    variable=modec
    selected=false
    text="mode"
    enabled=_isPaused()
    action=if(modec)mode=1; else mode=0; _initialize();
    variable=showp
    text="show"
    position=south
    layout=HBOX
    variable=f1
    minimum=10
    maximum=40
    format="f1=0"
    ticks=31
    enabled=_isPaused()
    dragaction=_initialize()
    variable=df
    minimum=0.0
    maximum=1.0
    format="df=0.00"
    ticks=21
    closest=true
    enabled=_isPaused()
    dragaction=_initialize()
    variable=skip
    minimum=0
    maximum=9
    format="skip=0"
    ticks=10
    dragaction=setview ()
    layout=GRID:0,2,0,0
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    variable=viewtrace
    text="trace"
    text="init"
    action=_initialize()
    variable=_isPaused
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    layout=border
    visible=showp
    location="75,51"
    size="578,384"
    position=center
    autoscaleX=false
    autoscaleY=true
    minimumX=0
    maximumX=xmax
    minimumY=-1.2
    maximumY=1.2
    title="sin(k*x-w*t)"
    points=np
    min=0
    max=xmax
    variable="x"
    functionx="x"
    functiony="Math.sin(k*x-w*t)"
    javaSyntax=true
    numberOfElements=ns
    x=px
    y=py
    sizeX=psize
    sizeY=psize
    pixelSize=true
    position=south
    layout=HBOX
    variable=wavelength
    minimum=xmax/50
    maximum=xmax/5
    format="wavelength=0.00"
    dragaction=k=2*pi/wavelength;
    variable=ns
    minimum=2
    maximum=100
    format="number of points=0"