This is the web version of EJS interface
EJS version 4.3.5
  1. Author=Fu-Kwun Hwang - Dept. of Physics,National Taiwan normal Univ.
  2. Abstract=http://www.phy.ntnu.edu.tw/ntnujava/ hwang@phy.ntnu.edu.tw
  3. CaptureTools=true
  4. DataTools=false
  5. LanguageTools=true
  6. EmersionSupport=false
  7. AppletColSupport=false
  8. UseInterpreter=true
    NameValueTypeDimension
    NameValueTypeDimension

    Evol Page

    Indep. Var. Increment
    SolverRungeKutta AbsoluteTolerance=0.00001

    關係式

    r=Math.sqrt(mx*mx+my*my); if(r<D/2){ g= 4*pi*r*G*rho/3.; }else{ g=G*rho*V/(r*r); } gx=-g*mx/r; gy=-g*my/r; V0=cst*m*G*rho*V*(2/D+1/D); V=pi*D*D*D/6; r=Math.sqrt(x*x+y*y); if(r<D/2){ f=4*pi*r*G*rho/3.*m; Vo=ymin+V0-cst*rho*4*pi*m*G/6*r*r; }else{ f=G*rho*V/(r*r)*m; Vo=ymin+cst*rho*V*m*G/r; } fx=-f*x/r; fy=-f*y/r; if(x<0)rx=-r; else rx=r;

    dvalue

    double dv; public double dvalue (double v) { if(v>0)dv=0.5; else if(v<0)dv=-0.5; else dv=0; return (int)(v*100+dv)/100.; }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    double,double,double
    title="Frame"
    layout=border
    visible=true
    size="434,517"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    x=mx
    y=my
    x=0
    y=0
    sizeX=D
    sizeY=D
    fillColor=LIGHTGRAY
    points=npt
    min=-D/2
    max=D/2
    variable="r"
    functionx="r"
    functiony="ymin+4*pi*G*rho*abs(r)/3"
    javaSyntax=false
    visible=showg
    points=npt
    min=D/2
    max=xmax
    variable="r"
    functionx="r"
    functiony="ymin+G*rho*pi*D*D*D/3/2/(r*r)"
    javaSyntax=false
    visible=showg
    points=npt
    min=xmin
    max=-D/2
    variable="r"
    functionx="r"
    functiony="ymin+G*rho*pi*D*D*D/3/2/(r*r)"
    javaSyntax=false
    visible=showg
    x=mx
    y=my
    sizeX=gx
    sizeY=gy
    visible=false
    x=x
    y=y
    sizeX=fx
    sizeY=fy
    lineColor=BLACK
    fillColor=BLACK
    lineWidth=stroke
    x=x
    y=y
    sizeX=size
    sizeY=size
    enabledPosition=ENABLED_ANY
    dragAction=/* r=Math.sqrt(x*x+y*y); if(r<D/2){ x=x*D/2/r; y=y*D/2/r; } */
    points=npt
    min=D/2
    max=xmax
    variable="r"
    functionx="r"
    functiony="ymin+cst*rho*V*m*G/r"
    javaSyntax=false
    visible=showV
    lineColor=BLUE
    lineWidth=stroke
    points=npt
    min=xmin
    max=-D/2
    variable="r"
    functionx="r"
    functiony="ymin-cst*rho*V*m*G/r"
    javaSyntax=false
    visible=showV
    lineColor=BLUE
    lineWidth=stroke
    points=npt
    min=-D/2
    max=D/2
    variable="r"
    functionx="r"
    functiony="ymin+V0-cst*rho*4*pi*m*G/6*r*r"
    javaSyntax=false
    visible=showV
    lineColor=BLUE
    lineWidth=stroke
    x=0
    y=ymin+V0-size*5
    pixelSize=true
    visible=showV
    text="potential V(r)"
    font=Monospaced,PLAIN,14
    elementposition=NORTH
    lineColor=BLUE
    lineWidth=stroke
    x=x
    y=y+size
    pixelSize=true
    text="object"
    font=Monospaced,PLAIN,14
    elementposition=SOUTH
    lineColor=BLUE
    x=rx
    y=Vo
    sizeX=size
    sizeY=size
    visible=showV
    lineColor=BLACK
    fillColor=null
    lineWidth=stroke
    pixelSize=true
    text="planet"
    font=Monospaced,PLAIN,14
    x=size
    y=ymin+size
    pixelSize=true
    visible=showg
    text="gravitation field"
    font=Monospaced,PLAIN,14
    elementposition=SOUTH_WEST
    x=x+fx/2
    y=y+fy/2
    pixelSize=true
    text="Gravitation Force"
    elementposition=NORTH_WEST
    fillColor=BLUE
    position=south
    layout=border
    position=east
    layout=GRID:0,1,0,0
    borderType=LOWERED_ETCHED
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    layout=VBOX
    variable=showg
    text="show g"
    variable=showV
    text="show V"
    position=center
    layout=GRID:0,2,0,0
    variable=D
    minimum=size
    maximum=xmax*1.8
    format="Diameter=0.00"
    dragaction=_step()
    variable=rho
    minimum=1.0
    maximum=5.0
    format="rho=0.00g/cm^3"
    variable=m
    minimum=0.1
    maximum=10.0
    format="m=0.00"
    variable=f
    minimum=0.0
    maximum=100.0
    format="m*g=0.00"