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

    Init Page

    vx=V*Math.cos(angle*pi/180.); vy=V*Math.sin(angle*pi/180.); x=xmin+size2; y=ymin+size2; t=0.;

    ODE

    Indep. Var. Increment
    d x /dt=vx
    d y /dt=vy
    d vx /dt=-k1*vx-k2*vx*Math.sqrt(vx*vx+vy*vy)
    d vy /dt=-g-k1*vy-k2*vy*Math.sqrt(vx*vx+vy*vy)
    SolverRungeKutta

    Cons Page

    if(_isPlaying() && x>xmax+size && y<ymin+size ){ //_initialize(); //commented by lookang to stop looping playpause(); //commented by lookang to stop looping } if(x>xmax*scale || y>ymax*scale){ scale=scale*1.2; }

    playpause

    public void playpause () { if(label==l_play){ label=l_pause; _play(); }else{ label=l_play; _pause(); } }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Airdrag"
    layout=border
    visible=true
    location="177,8"
    size="938,339"
    background=DARKGRAY
    position=south
    layout=border
    position=center
    layout=GRID:1,0,0,0
    size="50,50"
    border=3,3,3,3
    borderType=MATTE
    borderColor=64,0,128
    background=GRAY
    foreground=64,255,255
    position=east
    variable=k1
    format=" k1=0.000"
    foreground=192,255,64
    font=Dialog,BOLD,15
    variable=k2
    format=" k2=0.000000"
    foreground=192,255,64
    font=Dialog,BOLD,15
    variable=angle
    value=6.5115
    minimum=0
    maximum=90
    format="theta = 0.0"
    orientation=HORIZONTAL
    closest=true
    dragaction=_initialize()
    size="60,60"
    background=GRAY
    foreground=CYAN
    font=Dialog,BOLD,15
    position=center
    variable=V
    minimum=0.0
    maximum=range
    format=%l_Vini%
    dragaction=_initialize()
    background=GRAY
    foreground=CYAN
    font=Dialog,BOLD,15
    position=south
    layout=FLOW:left,0,0
    position=center
    variable=_isPaused
    size="90,35"
    imageOn="_data/play.gif"
    actionOn=_play()
    imageOff="_data/pause.gif"
    actionOff=_pause()
    image="_data/step.gif"
    action=_step()
    size="90,35"
    image="_data/init.gif"
    action=_initialize()
    size="90,35"
    image="_data/reset.gif"
    action=_reset()
    size="90,35"
    variable=t
    format=" time = 0.0"
    size="150,35"
    foreground=200,220,208
    font=Dialog,BOLD,18
    variable=x
    format=" x = 0.0 "
    size="150,35"
    foreground=200,220,208
    font=Dialog,BOLD,18
    variable=y
    format=" y = 0.0"
    size="150,35"
    foreground=200,220,208
    font=Dialog,BOLD,18
    variable=shoogrphic
    selected=true
    text="show graphic"
    foreground=255,255,0
    font=Dialog,BOLD,15
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin*scale
    maximumX=xmax*scale
    minimumY=ymin*scale
    maximumY=ymax*scale
    square=true
    background=DARKGRAY
    x=x
    y=y
    sizex=size
    sizey=size
    enabled=true
    secondaryColor=128,0,255
    color=192,192,0
    x=xmax*scale/2
    y=ymax*scale
    enabled=false
    text=%l_title%
    elementposition=NORTH
    color=PINK
    x=x
    y=y
    sizex=vx
    sizey=vy
    enabledSecondary=false
    enabled=_isPaused
    dragaction=angle=Math.atan2(vx,vy);
    color=CYAN
    secondaryColor=CYAN
    stroke=1.5
    x=x
    y=y
    memory=5
    drivenby=SHOW_ALL
    memorycolor=128,255,0
    active=_isPlaying
    norepeat=true
    connected=_isPlaying
    color=MAGENTA
    stroke=1.25
    position=east
    variable=scale
    minimum=1.0
    maximum=100.
    orientation=VERTICAL
    background=BLACK
    position=west
    variable=scale
    minimum=1.0
    maximum=100.
    format=scale=0.0
    orientation=VERTICAL
    background=BLACK
    foreground=192,128,0
    layout=border
    visible=shoogrphic
    location="296,554"
    size="338,280"
    position=center
    autoscaleX=true
    autoscaleY=true
    minimumX=0
    pressaction=_view.resetTraces()
    TLmessage="x"
    BRmessage="t"
    interiorBackground=128,192,0
    background=DARKGRAY
    foreground=255,128,0
    x=t
    y=x
    norepeat=true
    connected=true
    color=0,128,255
    stroke=stroke*1
    layout=border
    visible=shoogrphic
    location="896,553"
    size="336,273"
    position=center
    autoscaleX=true
    autoscaleY=true
    minimumX=0
    pressaction=_view.resetTraces()
    TLmessage="y"
    BRmessage="t"
    interiorBackground=128,192,0
    background=DARKGRAY
    foreground=255,128,0
    x=t
    y=y
    norepeat=true
    connected=true
    color=128,0,255
    stroke=stroke*1