This is the web version of EJS interface
EJS version 4.2.7
  1. Author=Fu-Kwun Hwang - Dept. of Physics, National Taiwan Normal Univ.
  2. Abstract=hwang@phy.ntnu.edu.tw
  3. CaptureTools=true
  4. DataTools=true
  5. LanguageTools=true
  6. EmersionSupport=false
  7. UseInterpreter=true
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    t=0; omega=0;

    Evol Page

    Indep. Var. Increment
    d cta /dt=omega
    d omega /dt=-g*Math.sin(cta)/L
    SolverRungeKutta AbsoluteTolerance=0.001

    FixRel Page

    sc=Math.sin(cta); cs=Math.cos(cta); x=xc+L*sc; y=yc-L*cs; vx=L*omega*cs; vy=L*omega*sc; T=m*(g*cs+L*omega*omega);

    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)
    title="Frame"
    layout=border
    visible=true
    size="543,495"
    position=center
    layout=GRID:1,0,0,0
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    x=xc
    y=yc
    sizeX=x-xc
    sizeY=y-yc
    x=x
    y=y
    sizeX=g*sc
    sizeY=-g*cs
    scalex=scale
    scaley=scale
    transformation=cta
    visible=showf
    style=RECTANGLE
    elementposition=SOUTH_EAST
    lineColor=0,0,255,128
    fillColor=0,0,255,128
    x=x
    y=y
    sizeX=0
    sizeY=-m*g
    scalex=scale
    scaley=scale
    visible=showf
    lineColor=0,0,255,192
    fillColor=0,0,255,192
    x=x
    y=y
    sizeX=vx
    sizeY=vy
    enabledSize=true
    dragAction=omega=Math.sqrt(vx*vx+vy*vy)/L; if(Math.atan2(x+vx-xc,yc-(y+vy))<cta)omega=-omega;
    lineColor=RED
    fillColor=RED
    x=x
    y=y
    sizeX=-T*sc
    sizeY=T*cs
    scalex=scale
    scaley=scale
    visible=showf
    lineColor=0,255,255,128
    fillColor=0,0,255,192
    lineWidth=stroke
    x=xc
    y=yc
    sizeX=0
    sizeY=ymin-yc
    lineColor=192,192,192,128
    x=x
    y=y
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    x=x
    y=y
    sizeX=size
    sizeY=size
    enabledPosition=true
    dragAction=omega=0; L=Math.sqrt((x-xc)*(x-xc)+(y-yc)*(y-yc)); cta=Math.atan2(x-xc,yc-y);
    lineColor=BLACK
    fillColor=BLACK
    x=x
    y=y-m*g*scale
    pixelSize=true
    visible=showf
    text="mg"
    font=Monospaced,PLAIN,16
    elementposition=NORTH
    lineColor=BLUE
    fillColor=BLUE
    x=x-T*sc*scale
    y=y+T*cs*scale
    pixelSize=true
    visible=showf
    text="T"
    font=Monospaced,PLAIN,16
    elementposition=SOUTH_WEST
    position=south
    layout=border
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    text="init"
    enabled=_isPaused()
    action=_initialize()
    variable=_isPaused
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    position=center
    layout=HBOX
    variable=showf
    text="show Force"
    variable=showv
    text="show Velocity"
    variable=showP
    text="show trace/Potential"