This is the web version of EJS interface
EJS version 5.2
  1. CaptureTools=false
  2. DataTools=false
  3. LanguageTools=false
  4. AppletColSupport=false
  5. UseMacMenuBar=false
  6. FixedNavigationBar=false
  7. RunInBrowserFirst=false
  8. RunAlways=true
  9. UseInterpreter=true
  10. UseDeltaForODE=false
  11. Author=Author name
  12. ManifestLines=Permissions: sandbox Codebase: * Caller-Allowable-Codebase: *
    NameValueTypeDimension
    NameValueTypeDimension

    初始值

    x=xi; y=0; t=0; vy=0;

    basic

    Indep. Var. Increment
    d x /dt=vx
    d y /dt=vy
    d vy /dt=q*calE(x)/m
    SolverRungeKuttaFehlberg AbsoluteTolerance=0.00001

    relation

    if((x-x0)*(x-x0-width)>=0){ if(x>xmax || y>ymax || y<ymin) _pause(); }else{ if( (y-y0)*(y+y0)>0)_pause(); }

    calE

    public double calE (double x) { if( (x-x0)*(x-x0-width)<0)return E; return 0; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Frame"
    layout=border
    visible=true
    size="848,359"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    x=x
    y=y
    sizeX=size
    sizeY=size
    x=x0
    y=-y0
    sizeX=width
    sizeY=0
    x=x0
    y=y0
    sizeX=width
    sizeY=0
    x=x
    y=y
    norepeat=true
    connected=true
    color=LIGHTGRAY
    x=x
    y=y
    sizeX=vx
    sizeY=vy
    enabledSize=ENABLED_ANY
    lineColor=RED
    fillColor=RED
    position=south
    layout=border
    position=center
    layout=HBOX
    position=center
    variable=E
    minimum=ymin
    maximum=ymax
    format="E=0.0"
    variable=m
    minimum=0.1
    maximum=10.0
    format="m=0.0"
    variable=q
    minimum=-1
    maximum=1.0
    format="q=0"
    ticks=3
    closest=true
    position=east
    layout=VBOX
    borderType=LOWERED_ETCHED
    variable=_isPaused
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    text="init"
    action=_initialize()
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()