This is the web version of EJS interface
EJS version 4.3.2
  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. UseInterpreter=true
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    for(int i=0;i<n;i++){ xp[i]=xmin2+i*dx; yp[i]=ymin2+i*dy; } C1=1./cc; for(int i=0;i<n2;i++){ xp2[i]=xmin2+i*dx2; yp2[i]=ymin2+i*dy2; }

    Evol Page

    Indep. Var. Increment
    SolverRungeKutta AbsoluteTolerance=0.00001

    FixRel Page

    if(xtype.equals("C*t+D")){ xfun=dvalue(C1)+"*t + "+dvalue(D1); xfun2=xfun; tmin=D1; tmax=D1+n*dx/C1; }else{ xfun=dvalue(A1)+"*sin("+dvalue(w1)+"*t + "+dvalue(B1)+")"; xfun2="("+xfun+")/(cc*4.)+xmax2/2+D1"; tmin=0; tmax=20; } if(ytype.equals("C*t+D")){ yfun=dvalue(C2)+"*t + "+dvalue(D2); }else{ yfun=dvalue(A2)+"*sin("+dvalue(w2)+"*t + "+dvalue(B2)+")"; } title="X(t) = "+xfun+", Y(t) = "+yfun; s1=dvalue(cc)+""; s2=dvalue(vdiv)+""; s3=dvalue(D1)+""; s4=dvalue(v0)+""; yfun2="("+yfun+")/vdiv+v0";

    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,double,double
    title="Frame"
    layout=border
    visible=true
    location="13,-9"
    size="791,413"
    position=south
    layout=border
    position=center
    layout=BORDER:0,0
    position=center
    layout=HBOX
    layout=HBOX
    visible=type.equals("C*t+D")
    variable=C
    minimum=1.0
    maximum=cmax
    format="C=0.00"
    dragaction=if(xtype.equals("C*t+D"))C1=C; if(ytype.equals("C*t+D"))C2=C;
    variable=D
    minimum=0.0
    maximum=dx*5*cc
    format="D=0.00"
    dragaction=if(xtype.equals("C*t+D"))D1=D; if(ytype.equals("C*t+D"))D2=D;
    layout=HBOX
    visible=type.equals("A*sin(w*t+B)")
    variable=A
    minimum=0.0
    maximum=amax
    format="A=0.00"
    dragaction=if(xtype.equals("A*sin(w*t+B)"))A1=A; if(ytype.equals("A*sin(w*t+B)"))A2=A;
    variable=w
    minimum=0.1
    maximum=6.0
    format="w=0.00"
    ticks=60
    closest=true
    dragaction=if(vtype.equals("X=")&&xtype.equals("A*sin(w*t+B)"))w1=w; if(vtype.equals("Y=")&&ytype.equals("A*sin(w*t+B)"))w2=w;
    variable=B
    minimum=0.0
    maximum=bmax
    format="B=0.00"
    dragaction=if(xtype.equals("A*sin(w*t+B)"))B1=B*a2c; if(ytype.equals("A*sin(w*t+B)"))B2=B*a2c;
    position=west
    layout=HBOX
    options="X=;Y="
    variable=%vtype%
    value="X="
    action=//if(vtype=="X=")xtype=type; //else ytype=type; if(vtype.equals("X="))type=xtype; else if(vtype.equals("Y="))type=ytype;
    size="50,0"
    options="A*sin(w*t+B);C*t+D"
    variable=%type%
    value="C*t+D"
    action=if(vtype.equals("X="))xtype=type; else if(vtype.equals("Y="))ytype=type;
    size="120,0"
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    position=center
    layout=border
    position=east
    layout=BORDER:0,0
    position=north
    layout=HBOX
    size="200,50"
    position=center
    layout=GRID:2,0,0,0
    position=north
    layout=BORDER:0,0
    position=north
    text="Time/Div"
    alignment=CENTER
    size="100,10"
    foreground=BLUE
    position=center
    variable=cc
    minimum=0.05
    maximum=1.
    minimumAngle=-90*a2c
    maximumAngle=630*a2c
    dragAction=C1=1./cc; //if(vtype.equals("X=") && type.equals("C*t+D"))C=1./cc; if(vtype.equals("X="))C=1./cc;
    size="100,100"
    position=south
    text=%s1%
    alignment=CENTER
    size="100,20"
    layout=BORDER:0,0
    position=north
    text="Volt/Div"
    alignment=CENTER
    size="100,10"
    foreground=BLUE
    position=center
    variable=vdiv
    minimum=0.1
    maximum=5
    minimumAngle=0
    maximumAngle=720*a2c
    size="100,100"
    position=south
    text=%s2%
    alignment=CENTER
    size="100,20"
    layout=BORDER:0,0
    position=north
    text="<------->"
    alignment=CENTER
    size="100,10"
    foreground=BLUE
    position=center
    variable=D1
    minimum=0
    maximum=dx*5*cc
    minimumAngle=0
    maximumAngle=720*a2c
    dragAction=//if(vtype.equals("X=")&&type.equals("C*t+D"))D=D1; if(vtype.equals("X="))D=D1;
    size="100,100"
    position=south
    text=%s3%
    alignment=CENTER
    size="100,20"
    layout=BORDER:0,0
    position=north
    text="y offset"
    alignment=CENTER
    size="100,10"
    foreground=BLUE
    position=center
    variable=v0
    minimum=ymin2
    maximum=ymax2
    minimumAngle=-360*a2c
    maximumAngle=360*a2c
    size="100,100"
    position=south
    text=%s4%
    alignment=CENTER
    size="100,20"
    position=south
    layout=HBOX
    size="200,50"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    background=LIGHTGRAY
    points=npt
    min=tmin
    max=tmax
    variable="t"
    functionx=%xfun2%
    functiony=%yfun2%
    javaSyntax=false
    lineColor=BLUE
    lineWidth=stroke
    x=xmax2
    y=0
    sizeX=xmax
    sizeY=ymax-ymin
    style=RECTANGLE
    elementposition=WEST
    lineColor=null
    fillColor=LIGHTGRAY
    numberOfElements=n
    x=xp
    y=ymin2
    sizeX=0
    sizeY=ymax2-ymin2
    numberOfElements=n
    x=xmin2
    y=yp
    sizeX=xmax2-xmin2
    sizeY=0
    y=ymax
    pixelSize=true
    text=%title%
    font=Monospaced,BOLD,16
    elementposition=NORTH_WEST
    lineColor=BLUE
    numberOfElements=n2
    x=xp2
    y=-dx2/2
    sizeX=0
    sizeY=dx2
    numberOfElements=n2
    x=5*dx-dy2/2
    y=yp2
    sizeX=dy2
    sizeY=0