This is the web version of EJS interface
EJS version 4.3.7
  1. Author=Fu-Kwun Hwang - Professor
  2. Abstract=http://www.phy.ntnu.edu.tw/ntujava/
  3. CaptureTools=false
  4. DataTools=false
  5. LanguageTools=false
  6. AppletColSupport=false
  7. UseMacMenuBar=false
  8. UseInterpreter=true
    NameValueTypeDimension
    NameValueTypeDimension

    初始值

    t=0; x=0; y=0;

    Evol Page

    Indep. Var. Increment
    d x /dt=vx
    d y /dt=vy
    d vx /dt=q*qs*vy*calB(x)/m
    d vy /dt=-q*qs*vx*calB(x)/m
    SolverRungeKutta AbsoluteTolerance=0.00001

    Name:ƥ,active=true,:Method:BISECTION,(~td1.0e-5),stopatEvent=true
    return y-ymin*scale2+size/2;


    ʧ@
    vy=-vy;

    Name:ƥ 2,active=true,:Method:BISECTION,(~td1.0e-5),stopatEvent=true
    return ymax*scale2-size/2-y;


    ʧ@
    vy=-vy;

    關係式

    v=Math.sqrt(vx*vx+vy*vy); /* if(x>xmax){ x=xmin+x-xmax; connect=false; tc=t; } else if(x<xmin){ x=xmax-(xmin-x); connect=false; tc=t; } */ if(x>xmax*scale || x<xmin*scale){ if(scale<10) scale=scale*Math.abs(x)/xmax; else _pause(); } if(!connect && tc<t-2*dt)connect=true; ts="time="+dvalue(t)+"us"; if(scale<scale2){ scale=scale2; uxmax=scale*xmax; }

    calB

    public double calB (double x) { return B0*Math.exp(-x*x/(2*sigma*sigma)); } public String dvalue(double v){ tt= (int)(100*v+dv)/100.; if(((int)(v*100.+dv)-(int)(v*10.+dv)*10)==0)return tt+"0"; return tt+""; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double,double,double,double,double,double
    title="Frame"
    layout=border
    visible=true
    location="27,0"
    size="495,618"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin*scale
    maximumX=xmax*scale
    minimumY=ymin*scale
    maximumY=ymax*scale
    square=true
    x=x
    y=y
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=connect
    x=x
    y=y
    sizeX=size
    sizeY=size
    x=x
    y=y
    sizeX=vx
    sizeY=vy
    enabledPosition=ENABLED_ANY
    enabledSize=ENABLED_ANY
    lineColor=RED
    fillColor=RED
    points=2000
    min=xmin*scale
    max=xmax*scale
    variable="x"
    functionx="x"
    functiony="B0*Math.exp(-x*x/(2*sigma*sigma))*scale2"
    javaSyntax=true
    lineColor=GRAY
    x=0
    y=ymax*scale2-size*2
    pixelSize=true
    text=%ts%
    font=Monospaced,PLAIN,14
    elementposition=NORTH_WEST
    x=xmin*scale
    y=ymin*scale2
    sizeX=range*scale*1.25
    sizeY=0
    x=xmin*scale
    y=ymax*scale2
    sizeX=range*scale*1.25
    sizeY=0
    position=south
    layout=border
    position=east
    layout=GRID:0,1,0,0
    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()
    position=center
    layout=VBOX
    layout=HBOX
    variable=B0
    minimum=0.0
    maximum=5.0
    format="B=0.00 T"
    variable=sigma
    minimum=size/10
    maximum=xmax*scale*5
    format="sigma=0.00"
    variable=dt
    minimum=0.001
    maximum=0.05*scale
    format="time step=0.000 us"
    layout=HBOX
    variable=m
    minimum=1.0
    maximum=10.0
    format="m=0.0 *ten^-26kg"
    ticks=10
    closest=true
    layout=GRID:0,1,0,0
    variable=qp
    text="+"
    action=if(qp)qs=1.6; else qs=-1.6; qn=!qp;
    variable=qn
    text="-"
    action=qp=!qn; if(qp)qs=1.6; else qs=-1.6;
    variable=q
    minimum=1.0
    maximum=10.0
    format="q=0.0 e"
    ticks=10
    closest=true
    variable=v
    minimum=0.0
    maximum=2*scale
    format="v=0.00 km/s"
    dragaction=vc=Math.atan2(vy,vx); vx=v*Math.cos(vc); vy=v*Math.sin(vc);
    layout=HBOX
    position=center
    variable=x
    format="x=0.00"
    variable=y
    format="y=0.00"
    variable=uxmax
    format="scale=0.00"
    action=scale=uxmax/xmax;
    variable=uymax
    format="wall y range=0.00"
    action=scale2=uymax/ymax;
    position=north
    variable=scale
    minimum=1.0
    maximum=20.0
    orientation=HORIZONTAL
    dragaction=uxmax=scale*xmax;
    position=west
    variable=scale2
    minimum=1.0
    maximum=20.0
    orientation=VERTICAL