This is the web version of EJS interface
EJS version 4.2.7
  1. CaptureTools=true
  2. DataTools=true
  3. LanguageTools=true
  4. EmersionSupport=true
  5. UseInterpreter=true
  6. AuxiliaryFiles=_data/reset.gif;
  7. DetectedFiles=_data/reset.gif;
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    FixRel Page

    if(mode.equals("C=A+B")){ dx3=dx1+dx2; dy3=dy1+dy2; }else if(mode.equals("A=C-B")){ dx1=dx3-dx2; dy1=dy3-dy2; }else{ dx2=dx3-dx1; dy2=dy3-dy1; } msg1="A=("+dvalue(dx1)+","+dvalue(dy1)+")"; msg2="B=("+dvalue(dx2)+","+dvalue(dy2)+")"; msg3="C=("+dvalue(dx3)+","+dvalue(dy3)+")"; d1=Math.sqrt(dx1*dx1+dy1*dy1); d2=Math.sqrt(dx2*dx2+dy2*dy2); d3=Math.sqrt(dx3*dx3+dy3*dy3); p1=(dx1*dx3+dy1*dy3)/(d3); p2=(dx2*dx3+dy2*dy3)/(d3); n1=(-dx1*dy3+dy1*dx3)/d3; n2=(-dy2*dy3+dy2*dx3)/d3; c3=Math.atan2(dx3,dy3); if(show)msg="C=A+B; Cx=Ax+Bx, Cy=Ay+By"; else msg="C=A+B; C=Ap+Bp, An+Bn=0";

    dvalue

    double dv=0; 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,double
    title="Frame"
    layout=border
    visible=true
    location="160,75"
    size="689,610"
    position=south
    layout=border
    position=center
    layout=GRID:0,1,0,0
    layout=HBOX
    background=DARKGRAY
    foreground=192,255,64
    text="A="
    alignment=CENTER
    background=192,255,64
    foreground=BLUE
    variable=dx1
    minimum=xmin
    maximum=xmax
    format="Ax=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("A=C-B")
    variable=dy1
    minimum=ymin
    maximum=ymax
    format="Ay=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("A=C-B")
    layout=HBOX
    background=DARKGRAY
    foreground=255,128,64
    text="B="
    alignment=CENTER
    background=255,128,64
    foreground=BLUE
    variable=dx2
    value=-40.0
    minimum=xmin
    maximum=xmax
    format="Bx=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("B=C-A")
    variable=dy2
    minimum=ymin
    maximum=ymax
    format="By=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("B=C-A")
    layout=HBOX
    background=DARKGRAY
    foreground=PINK
    text="C="
    alignment=CENTER
    background=PINK
    foreground=BLUE
    variable=dx3
    minimum=xmin
    maximum=xmax
    format="Cx=Ax+Bx=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("C=A+B")
    variable=dy3
    minimum=ymin
    maximum=ymax
    format="Cy=Ay+By=0.00"
    ticks=ntick
    closest=!drag
    enabled=!mode.equals("C=A+B")
    position=east
    layout=GRID:0,1,0,0
    visible=true
    borderType=LOWERED_ETCHED
    variable=show
    text="X-Y mode"
    background=BLACK
    foreground=64,255,0
    options="C=A+B;A=C-B;B=C-A"
    variable=mode
    background=BLACK
    foreground=128,0,255
    image="_data/reset.gif"
    action=_reset()
    size="90,35"
    position=center
    autoscaleX=false
    autoscaleY=false
    minimumX=xmin
    maximumX=xmax
    minimumY=ymin
    maximumY=ymax
    square=true
    background=GRAY
    x=x1
    y=y1
    sizeX=dx1
    sizeY=dy1
    visible=show
    style=RECTANGLE
    elementposition=SOUTH_WEST
    lineColor=null
    fillColor=0,0,255,128
    x=x1
    y=y1
    sizeX=dx1
    sizeY=dy1
    enabledSize=!mode.equals("A=C-B")
    pressAction=drag=true;
    releaseAction=drag=false;
    lineColor=BLUE
    fillColor=BLUE
    lineWidth=stroke
    x=x2
    y=y2
    sizeX=dx2
    sizeY=dy2
    enabledSize=!mode.equals("B=C-A")
    lineColor=CYAN
    fillColor=CYAN
    lineWidth=stroke
    x=x2
    y=y2
    sizeX=dx2
    sizeY=dy2
    visible=show
    style=RECTANGLE
    elementposition=SOUTH_WEST
    lineColor=null
    fillColor=0,255,255,128
    x=x1+dx1
    y=y1+dy1
    pixelSize=true
    text=%msg1%
    font=Monospaced,BOLD,20
    elementposition=SOUTH_WEST
    lineColor=BLUE
    fillColor=BLUE
    x=x2+dx2
    y=y2+dy2
    pixelSize=true
    text=%msg2%
    font=Monospaced,BOLD,20
    elementposition=SOUTH_EAST
    lineColor=CYAN
    fillColor=CYAN
    x=x3+dx3
    y=y3+dy3
    pixelSize=true
    text=%msg3%
    font=Monospaced,BOLD,20
    elementposition=SOUTH
    lineColor=WHITE
    fillColor=WHITE
    x=0
    y=ymin+2*size
    pixelSize=true
    text=%msg%
    font=Monospaced,BOLD,20
    elementposition=SOUTH
    x=x1
    y=y1
    sizeX=n1
    sizeY=p1
    transformation=-c3
    visible=!show
    style=RECTANGLE
    elementposition=SOUTH_EAST
    lineColor=null
    fillColor=0,0,255,128
    x=x3
    y=y3
    sizeX=dx3
    sizeY=dy3
    style=RECTANGLE
    elementposition=SOUTH_WEST
    lineColor=255,255,255,128
    fillColor=255,255,255,128
    x=x2
    y=y2
    sizeX=-n1
    sizeY=d3-p1
    transformation=-c3
    visible=!show
    style=RECTANGLE
    elementposition=SOUTH_EAST
    lineColor=null
    fillColor=0,255,255,128
    x=x1+n1*dy3/d3
    y=y1-n1*dx3/d3
    pixelSize=true
    visible=!show
    text="Bn"
    font=Monospaced,PLAIN,16
    elementposition=NORTH_EAST
    x=x3
    y=y3
    sizeX=dx3
    sizeY=dy3
    enabledSize=!mode.equals("C=A+B")
    lineColor=WHITE
    fillColor=WHITE
    lineWidth=stroke
    x=x1
    y=y1
    sizeX=n1*dy3/d3
    sizeY=-n1*dx3/d3
    visible=!show
    lineColor=0,0,0,128
    fillColor=0,0,0,128
    x=x1
    y=y1
    sizeX=-n1*dy3/d3
    sizeY=n1*dx3/d3
    visible=!show
    lineColor=0,0,0,128
    fillColor=0,0,0,128
    x=x1-n1*dy3/d3
    y=y1+n1*dx3/d3
    pixelSize=true
    visible=!show
    text="An"
    font=Monospaced,PLAIN,16
    elementposition=NORTH_WEST
    x=0
    y=ymax-size
    pixelSize=true
    text=%mode%
    font=Monospaced,BOLD,20
    elementposition=NORTH