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="569,494"
    position=center
    layout=GRID:1,0,0,0
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    background=BLACK
    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=192,0,0
    fillColor=BLACK
    x=xc
    y=yc
    sizeX=x-xc
    sizeY=y-yc
    lineColor=128,0,192
    x=x
    y=y
    sizeX=g*sc
    sizeY=-g*cs
    scalex=scale
    scaley=scale
    transformation=cta
    visible=showf
    style=RECTANGLE
    elementposition=SOUTH_EAST
    lineColor=192,0,0
    fillColor=128,192,128,255
    x=x
    y=y
    sizeX=0
    sizeY=-m*g
    scalex=scale
    scaley=scale
    visible=showf
    lineColor=255,128,0
    fillColor=255,128,0
    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=PINK
    fillColor=PINK
    x=x
    y=y
    sizeX=-T*sc
    sizeY=T*cs
    scalex=scale
    scaley=scale
    visible=showf
    lineColor=200,220,208
    fillColor=200,220,208
    lineWidth=stroke
    x=xc
    y=yc
    sizeX=0
    sizeY=ymin-yc
    lineColor=64,128,0
    x=x
    y=y
    maxpoints=npt
    active=_isPlaying()
    norepeat=true
    connected=_isPlaying()
    x=x
    y=y-m*g*scale
    pixelSize=true
    visible=showf
    text="mg"
    font=Monospaced,PLAIN,16
    elementposition=NORTH
    lineColor=255,128,0
    fillColor=255,128,0
    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
    background=DARKGRAY
    foreground=200,220,208
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    text="Reset"
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    foreground=255,255,0
    text="init"
    enabled=_isPaused()
    action=_initialize()
    foreground=255,255,0
    variable=_isPaused
    textOn="Play"
    imageOn=/org/opensourcephysics/resources/controls/images/play.gif
    actionOn=_play()
    foreground=255,255,0
    textOff="Pause"
    imageOff=/org/opensourcephysics/resources/controls/images/pause.gif
    actionOff=_pause()
    foregroundOff=255,255,0
    position=center
    layout=HBOX
    foreground=128,255,0
    variable=showf
    text="show Force"
    variable=showv
    text="show Velocity"
    variable=showP
    text="show trace/Potential"
    position=south
    layout=HBOX
    foreground=192,255,0
    font=Dialog,BOLD,12
    variable=x
    format="x = 0.0"
    variable=y
    format="y = 0.0"
    variable=sc
    format="sc = 0.0"
    variable=cs
    format="cs = 0.0"
    variable=omega
    format="omega = 0.0"
    variable=vx
    format="vx = 0.0"
    variable=vy
    format="vy = 0.0"