This is the web version of EJS interface
EJS version 4.2
  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

    Evol Page

    Indep. Var. Increment
    d c[i] /dt=omega[i]
    d L[i] /dt=vL[i]
    d vL[i] /dt=(-k*(L[i]+L0+fcst*Math.cos(c[i]))-b*vL[i])/m
    SolverRungeKutta AbsoluteTolerance=0.00001

    FixRel Page

    w0=Math.sqrt(k/m); if(sync){ omega[0]=w0*ratio; omega[1]=w0; omega[2]=w0/ratio; } w0m="w0="+dvalue(w0); for(int i=0;i<n;i++){ wm[i]="w="+dvalue(omega[i]); yc[i]=y+size2*Math.sin(c[i]); xc[i]=x[i]+size2*Math.cos(c[i]); ys[i]=yc[i]+(y1-y); ym[i]=ys[i]+L[i]; v[i]=size*Math.cos(c[i]); }

    dvalue

    double dv; public double dvalue (double v) { if(v>0)dv=0.5; else if(v<0)dv=-0.5; else dv=0; return (int)(v*100+dv)/100.; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Frame"
    layout=border
    visible=true
    size="499,526"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    numberOfElements=n
    x=x
    y=ym
    sizeX=size2*Math.sqrt(m)
    sizeY=size2*Math.sqrt(m)
    fillColor=BLACK
    numberOfElements=n
    x=x
    y=y
    sizeX=size
    sizeY=size
    transformation=c
    style=WHEEL
    fillColor=GRAY
    numberOfElements=3
    x=x
    y=ys
    sizeX=0
    sizeY=L
    radius=size2/1.5
    numberOfElements=3
    x=x
    y=yc
    sizeX=size1
    sizeY=size1
    fillColor=CYAN
    numberOfElements=n
    x=x
    y=ys
    sizeX=size2
    sizeY=size2
    fillColor=CYAN
    numberOfElements=n
    x=xc
    y=yc
    sizeX=size1
    sizeY=size1
    fillColor=CYAN
    numberOfElements=n
    x=x
    y=yc
    sizeX=0
    sizeY=y1-y
    lineColor=BLUE
    lineWidth=stroke*2
    numberOfElements=n
    x=x
    y=ys
    sizeX=0
    sizeY=v
    lineColor=RED
    fillColor=RED
    numberOfElements=n
    x=x
    y=ym
    sizeX=0
    sizeY=vL
    lineColor=RED
    fillColor=RED
    numberOfElements=n
    x=x
    y=ymax
    pixelSize=true
    text=%wm%
    font=Monospaced,PLAIN,20
    elementposition=NORTH
    x=0
    y=ymin
    pixelSize=true
    text=%w0m%
    font=Monospaced,PLAIN,20
    elementposition=SOUTH
    position=south
    layout=border
    position=east
    layout=GRID:0,1,0,0
    borderType=LOWERED_ETCHED
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    variable=_isPaused
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    position=center
    layout=HBOX
    variable=m
    minimum=1
    maximum=10
    format="m=0.0"
    ticks=10
    variable=k
    minimum=1
    maximum=10
    format="k=0.0"
    ticks=10
    variable=sync
    text="sync"
    variable=ratio
    minimum=0.5
    maximum=2.0
    format="ratio=0.0"
    enabled=sync