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/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(); playpause(); } 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="121,-42"
    size="1004,376"
    background=DARKGRAY
    position=south
    layout=hbox
    position=center
    layout=GRID:2,0,0,0
    size="20,26"
    border=5,5,5,5,
    borderType=TITLED
    borderColor=255,128,0
    borderPosition=ABOVE_TOP
    printTarget="Ahmed"
    background=BLACK
    image="_data/reset.gif"
    enabled=_isPaused
    action=_reset()
    size="85,35"
    image="_data/init.gif"
    enabled=_isPaused
    action=_initialize()
    size="85,35"
    variable=_isPaused
    size="85,35"
    imageOn="_data/play.gif"
    actionOn=_play()
    imageOff="_data/pause.gif"
    actionOff=_pause()
    image="_data/step.gif"
    action=_step()
    size="85,35"
    layout=GRID:2,0,0,0
    background=BLACK
    foreground=255,128,0
    position=center
    variable=V
    minimum=0.0
    maximum=range
    format=%l_Vini%
    background=BLACK
    foreground=128,255,0
    position=east
    variable=k1
    format=" k1=0.000"
    size="20,20"
    foreground=192,255,64
    font=Dialog,BOLD,15
    variable=k2
    format=" k2=0.000000"
    size="20,20"
    foreground=192,255,64
    font=Dialog,BOLD,15
    variable=angle
    value=6.5106
    minimum=0
    maximum=90
    format="theta = 0.0"
    orientation=HORIZONTAL
    closest=true
    dragaction=_initialize()
    size="60,60"
    background=BLACK
    foreground=CYAN
    font=Dialog,BOLD,15
    variable=t
    format=" Time = 0.0"
    size="20,20"
    foreground=255,128,0
    font=Dialog,BOLD,25
    variable=x
    format=" x = 0.0"
    font=Dialog,BOLD,25
    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
    position=north
    background=200,220,208
    text="Equations"
    text="x=xmin+size2"
    action=_alert("Easy Java Simulations","Ahmedelshfie","equation (x) ")
    text="y=ymin+size2"
    action=_alert("Easy Java Simulations","Ahmedelshfie","equation (y)")
    text="vx=V*Math.cos(angle*pi/180.)"
    action=_alert("Easy Java Simulations","Ahmedelshfie","equation (vx) ")
    text="vy=V*Math.sin(angle*pi/180.)"
    action=_alert("Easy Java Simulations","Ahmedelshfie","equation (vy) ")
    text="t=0."
    action=_alert("Easy Java Simulations","Ahmedelshfie","equation (time)")
    text="Creadite"
    foreground=BLACK
    text="Forum on Easy Java Simulation: Fu-Kwun Hwang"
    alignment=LEFT
    action=_alert("Easy Java Simulations","Fu-Kwun Hwang","http://www.phy.ntnu.edu.tw/ntnujava/index.php")
    text="Modified by : Ahmedelshfie (may 2010)"
    alignment=LEFT
    action=_alert("Easy Java Simulations","Ahmedelshfie","http://www.phy.ntnu.edu.tw/ntnujava/index.php?board=43.0")
    text="Help"
    foreground=BLACK
    text="bottom panel hit the PLAY button to start the simulation as the variables keyed in by you earlier."
    action=_alert("Easy Java Simulations","Ahmedelshfie","PLAY = RUN simulation")
    text="bottom panel hit PAUSE button momentarily stop the simulation, to continue, hit PLAY again. "
    action=_alert("Easy Java Simulations","Ahmedelshfie","PAUSE allows students to study what happens at the point in time by reading the values and toggling the variables to observe")
    text="bottom panel hit INITIALISE to tell simulation to read the values key in the applet and continue to normally,"
    action=_alert("Easy Java Simulations","Ahmedelshfie","to tell applet to start from (0,0) again while keeping previous paths in the simulation ")
    text="hit PLAY to experiment start at (0,0) again while keeping the previous sets of data points. "
    action=_alert("Easy Java Simulations","Ahmedelshfie","to tell applet to start from (0,0) again while keeping previous paths in the simulation ")
    text="bottom panel hit RESET to restore back to initial state of the applet, to start a new experiment, used for a new experiment. "
    action=_alert("Easy Java Simulations","Ahmedelshfie","if applet is running very slowly, RESET restores applet to its beginning state")
    text="bottom to run simulation step by step ."
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain more slowly, Step run applet step by step")
    text="Student can adjust (k1),(k2) to find a suitable model for the case s/he want to simulated and compared with the real case under studied,"
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about k1,k2,and what is job of k1,k2")
    text="And that can be one of the purpose for the above simulation,To find out a suitbale model for a real case."
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about k1,k2,and what is job of k1,k2")
    text="(Slider theta) drag the slider for you control in angle (the maximum of angle is 90 degree)."
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about theta,and what is job of slider theta")
    text="(Slider initial V) for student can control in velcoity of mass."
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about initial V,and what is job of slider Initial V")
    text="time from begin run simulation still finish count how much time spend."
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about time,and what is job of time")
    text="(x) shown us position of mass "
    action=_alert("Easy Java Simulations","Ahmedelshfie","for explain about x shown us position of mass ,and what is job of x")