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
  8. DetectedFiles=./_data/flat-mirror.png;
    NameValueTypeDimension
    NameValueTypeDimension

    Init Page

    px1[1]=px2[1]=px3[1]=x0; py1[1]=y1; py2[1]=y2; py3[1]=y3;

    Evol Page

    Indep. Var. Increment
    SolverRungeKutta AbsoluteTolerance=0.00001

    FixRel Page

    drawlines(); /* if(my>y1){ py1[2]=ymin; m=(y1-ymin)/(my-y1); px1[2]=x0+m*(mx-x0); }else if(my<y1){ py1[2]=ymax; m=(ymax-y1)/(y1-my); px1[2]=x0+m*(mx-x0); }else { py1[2]=y1; px1[2]=xmax; } */

    setline

    public void setline (double y,double px[],double py[]) { if(my>y){ py[2]=ymin; m=(y-ymin)/(my-y); px[2]=x0+m*(mx-x0); }else if(my<y){ py[2]=ymax; m=(ymax-y)/(y-my); px[2]=x0+m*(mx-x0); }else { py[2]=y; px[2]=mx; } } public void drawlines(){ if(mx>x0){ px1[0]=px2[0]=px3[0]=mx; py1[0]=py2[0]=py3[0]=my; setline(y1,px1,py1); setline(y2,px2,py2); setline(y3,px3,py3); ix=x0-(mx-x0); iy=my; idx=mx-x0; idy[0]=y1-my; idy[1]=y2-my; idy[2]=y3-my; cnt++; } }
    EJSVIEW: Click link to view it's content
    Control variables:(testing)
    title="Frame"
    layout=border
    visible=true
    size="496,400"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    x=mx
    y=my
    dragaction=if(cnt>1)connect=true;
    action=connect=false; cnt=0;
    sizeX=h*ratio
    sizeY=h
    imageFile="./_data/flat-mirror.png"
    x=x
    y=y
    sizeX=size
    sizeY=size
    xData=px1
    yData=py1
    closed=false
    lineColor=clr
    lineWidth=stroke
    xData=px2
    yData=py2
    closed=false
    lineColor=clr
    lineWidth=stroke
    xData=px3
    yData=py3
    closed=false
    lineColor=clr
    lineWidth=stroke
    numberOfElements=n
    x=ix
    y=iy
    sizeX=idx
    sizeY=idy
    lineColor=MAGENTA
    lineWidth=stroke
    x=mx
    y=my
    memory=nt
    memorycolor=0,0,0,128
    maxpoints=npt
    norepeat=true
    connected=connect
    color=0,0,255,128
    stroke=stroke
    x=ix
    y=iy
    memory=nt
    memorycolor=0,0,0,128
    maxpoints=npt
    norepeat=true
    connected=connect
    color=0,0,255,128
    stroke=stroke
    position=south
    layout=border
    position=east
    layout=HBOX
    borderType=LOWERED_ETCHED
    text="reset"
    image=/org/opensourcephysics/resources/controls/images/reset.gif
    action=_reset()
    position=center
    text="clear"
    action=_initialize()