This is the web version of EJS interface
EJS version 4.2.7
  1. CaptureTools=true
  2. DataTools=true
  3. LanguageTools=true
  4. EmersionSupport=true
  5. UseInterpreter=true
  6. AuxiliaryFiles=_data/graspingHand.gif;_data/ballBlue16.gif;_data/rapporteur.gif;_data/pause.gif;_data/play.gif;_data/init.gif;_data/reset.gif;
  7. DetectedFiles=_data/ballBlue16.gif;_data/graspingHand.gif;_data/init.gif;_data/pause.gif;_data/play.gif;_data/rapporteur.gif;_data/reset.gif;
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    yc=y1=ymin+size2; y2=ytop; t=0; vy1=0; yL=y1-y0+size2; release=false; _pause(); _view.trace.clear(); drag=false; hangc=0; for(int i=0;i<n;i++){ xp[i]=0; yp[i]=ymin+size2; free[i]=true; hangid[i]=-1; } springL=L0; ys=ytop-springL;

    Evol Page

    Indep. Var. Increment
    d y1 /dt=vy1
    d vy1 /dt=getF()/m1
    d ys /dt=vy
    d vy /dt=k*(ytop-ys-L0)/m-hangc*g-b*vy
    SolverRungeKutta AbsoluteTolerance=0.001

    FixRel Page

    if(y1<ymin+size2){ y1=ymin+size2; // _pause(); } for(int i=0;i<n;i++){ if(hangid[i]>-1){ yp[i]=ys-hangid[i]*size-size2; xp[i]=0; } } dc=k*(ytop-ys-L0)*pi*2/(10*m*g); cx=R*Math.sin(dc); cy=R*Math.cos(dc); f=(int)(k*(ytop-ys-L0)*10/m+0.5)/10.; wmsg="F="+f+" N"; dymsg="dy="+(int)((ytop-ys-L0)*10.+0.5)/10.;

    getF

    public double getF () { if(release && y1>ymin+size2)return -g; else return 0; } public boolean check(double x,double y){ return Math.sqrt(x*x+y*y)<size2; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    title="Frame"
    layout=border
    visible=true
    location="190,-31"
    size="615,635"
    background=DARKGRAY
    position=south
    layout=border
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    image="_data/reset.gif"
    action=_reset()
    size="90,35"
    image="_data/init.gif"
    action=_initialize()
    size="90,35"
    variable=_isPaused
    size="80,35"
    imageOn="_data/play.gif"
    actionOn=_play()
    imageOff="_data/pause.gif"
    actionOff=_pause()
    variable=showv
    selected=true
    text="show velocity"
    foreground=192,255,64
    variable=showd
    selected=true
    text="show displacement"
    foreground=192,255,64
    variable=showpr
    text="show protractor "
    enabled=release
    foreground=192,255,64
    position=center
    tabTitles="Experiment 1,Experiment 2"
    foreground=64,192,0
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    background=255,255,255,255
    x=x1+0
    y=ymin+size2
    sizeX=size
    sizeY=size
    lineColor=LIGHTGRAY
    fillColor=null
    x=x1+0
    y=y1
    sizeX=size
    sizeY=size
    enabledPosition=false
    dragAction=if(y1>y0-size)y1=y0-size; else if(y1<ymin/2)y1=ymin/2; y2=-y1;
    imageFile="_data/ballBlue16.gif"
    x=x1+size2
    y=y0
    sizeX=size
    sizeY=size
    transformation=-y1/size
    style=WHEEL
    elementposition=CENTERED
    lineColor=255,192,0
    fillColor=GRAY
    lineWidth=stroke
    x=x2-size2
    y=y0
    sizeX=size
    sizeY=size
    transformation=y2/size
    enabledPosition=false
    style=WHEEL
    lineColor=255,192,0
    fillColor=GRAY
    lineWidth=stroke
    x=x2+size2/2
    y=y2
    sizeX=size*2
    sizeY=size
    visible=!release
    enabledPosition=true
    sensitivity=0
    pressAction=drag=true;
    dragAction=if(y2>ytop)y2=ytop; else if(y2<ymin+2*size)y2=ymin+2*size; y1=ymin+size2+(ytop-y2); yL=y1-y0+size2; yc=y1;
    releaseAction=yc=y1; release=true; _play();
    imageFile="_data/graspingHand.gif"
    x=x2
    y=y0
    sizeX=0
    sizeY=y2-y0-size
    lineColor=255,192,0
    lineWidth=stroke
    x=x1+size2
    y=y0+size2
    sizeX=x2-x1-size
    sizeY=0
    lineColor=255,192,0
    lineWidth=stroke
    x=x2-size
    y=yb
    sizeX=0
    sizeY=y2-yb
    visible=showd
    lineColor=128,0,255
    fillColor=128,0,255
    x=x1-size
    y=yc
    sizeX=size
    sizeY=0
    visible=showd && drag
    lineColor=255,192,0
    x=x1-size
    y=y1
    sizeX=size
    sizeY=0
    visible=showd && drag
    lineColor=255,0,0
    x=x1-size
    y=yc
    sizeX=x2-x1
    sizeY=ytop-yc
    visible=drag &&showd
    lineColor=128,0,0
    x=x1-size
    y=ya
    sizeX=x2-x1
    sizeY=y2-ya
    visible=drag &&showd
    lineColor=128,0,0
    x=x1
    y=y0
    sizeX=0
    sizeY=yL
    lineColor=255,192,0
    lineWidth=stroke
    x=x1
    y=y1
    memory=1
    clearAtInput=false
    skippoints=skip
    active=_isPlaying() && y1>ymin+size
    norepeat=true
    connected=true
    color=255,0,255
    style=ELLIPSE
    markersize=5
    x=x1
    y=y1
    sizeX=0
    sizeY=vy1
    visible=_isPlaying() && showv
    lineColor=128,0,0
    fillColor=128,0,0
    x=x1-size
    y=ya
    sizeX=0+0
    sizeY=y1-ya
    visible=showd
    lineColor=128,0,255
    fillColor=128,0,255
    x=x1-size
    y=yc
    sizeX=0
    sizeY=y1-yc
    visible=showd
    lineColor=BLACK
    fillColor=BLACK
    x=x1
    y=ymin+size2
    sizeX=2
    sizeY=2
    pixelSize=true
    visible=y1==ymin+size2
    lineColor=MAGENTA
    fillColor=MAGENTA
    x=xpc
    y=ypc
    trueSize=true
    visible=showpr && release
    enabledPosition=true
    sensitivity=0
    imageFile="_data/rapporteur.gif"
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    background=BLACK
    x=size*1.2
    y=ytop-L0
    pixelSize=true
    visible=showd
    text=%dymsg%
    font=Monospaced,PLAIN,18
    elementposition=WEST
    lineColor=128,0,0
    fillColor=128,0,0
    x=size*1.2
    y=ytop
    pixelSize=true
    text=%wmsg%
    font=Monospaced,PLAIN,18
    elementposition=WEST
    lineColor=128,0,0
    fillColor=128,0,0
    numberOfElements=n
    x=xp
    y=yp
    sizeX=size
    sizeY=size
    enabledPosition=free
    elementSelected=id
    pressAction=add=false;
    dragAction=if(id>-1 && id<n){ if(check(xp[id],yp[id]+hangc*size-ys)){ free[id]=false; hangid[id]=hangc; xp[id]=0; yp[id]=ys-size2; add=true; } }
    releaseAction=if(add){ hangc++; _play(); add=false; }
    imageFile="_data/ballBlue16.gif"
    x=0
    y=ytop+size
    sizeX=2*size
    sizeY=2*size
    lineColor=255,192,0
    fillColor=192,128,0,128
    lineWidth=stroke
    x=0
    y=ytop+size
    sizeX=cx
    sizeY=cy
    lineColor=192,0,0
    fillColor=192,0,0
    x=0
    y=ytop
    sizeX=size2
    sizeY=size2
    visible=false
    lineColor=MAGENTA
    x=0
    y=ytop
    sizeX=size*1.2
    sizeY=L0
    style=RECTANGLE
    elementposition=NORTH
    fillColor=200,220,208
    lineWidth=stroke
    x=0
    y=ytop
    sizeX=0
    sizeY=ys-ytop
    radius=size2
    loops=10
    lineColor=DARKGRAY