This is the web version of EJS interface
EJS version 4.1
  1. CaptureTools=true
  2. DataTools=true
  3. LanguageTools=true
  4. DetectedFiles=./_data/eyescan.gif;./_data/graspingHand.gif;./_data/shark.gif;

Intro Page

Designed by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension
    NameValueTypeDimension

    Evol Page

    Indep. Var. Increment
    d fishx /dt=fishvx
    d objx /dt=objvx
    SolverMidPoint

    Cons Page

    double ml,mr,xc,dx,dy,c1,c2,sc1,sangle,ratio; if(_isPlaying()){ if(fishx>xmax-fishw/2){ fishvx=-fishvx; fishw=-fishw; }else if(fishx<xmin-fishw/2){ fishvx=-fishvx; fishw=-fishw; } dragfish(); if(objx>xmax+objw/2){ objvx=-objvx; objw=-objw; }else if(objx<xmin+objw/2){ objvx=-objvx; objw=-objw; } dragobj(); } calpath(LX,LY); calpath(RX,RY); IX[0]=LX[1]; IX[2]=RX[1]; ml=(LX[2]-LX[1])/LY[2]; mr=(RX[2]-RX[1])/RY[2]; IY[1]=imagey= (RX[1]-LX[1])/(ml-mr); IX[1]=imagex=ml*imagey+LX[1];//(mr*LX[1]-ml*RX[1])/(mr-ml); dx=LX[1]-fishx; dy=fishy; sangle=Math.abs(LX[1]-RX[1])/Math.abs(dx*dx+dy*dy)*75.; // r12=calr12(dx,dy); /* sc2=dx/Math.sqrt(dx*dx+dy*dy); if(sc2!=0.0){ sc1=n2*sc2/n1; c1=Math.asin(sc1); c2=Math.asin(sc2); r12=Math.sin(c1-c2)/Math.sin(c1+c2); }else{ r12=0.0; } */ //r12=calr12(LX[1]-fishx,fishy); cwhite=new java.awt.Color(255,255,255); totalreflection=false; if(eyey>0){ calimage (fishw/2,fishh/2); fishimagex=imagex; fishimagey=imagey; fishimagew=imagew; fishimageh=imageh; tracex=fishx; tracey=fishy; r12=calr12(LX[1]-fishx,fishy); }else if(eyey<0){ tracex=objx; tracey=objy; calimage(objw/2,objh/2); xc=getxc(eyex,eyey);// eyex+(fishx-eyex)*eyey/(eyey+fishy); if(n2/n1*Math.abs((xc-eyex)/Math.sqrt((xc-eyex)*(xc-eyex)+eyey*eyey))>1){// total internal reflection cwhite=new java.awt.Color(255,255,255,0); fishimagex=fishx; fishimagey=-fishy; fishimagew=fishw; fishimageh=-fishh; RX2[0]=fishx; RY2[0]=fishy; RX2[1]=getxc(eyex+eyew/2,eyey); RY2[1]=zero; RX2[2]=fishx; RY2[2]=-fishy; RX2[3]=eyex+eyew/2; RY2[3]=eyey; RX2[4]=eyex-eyew/2; RY2[4]=eyey; RX2[5]=fishx; RY2[5]=-fishy; RX2[6]=getxc(eyex-eyew/2,eyey); RY2[6]=zero; RX2[7]=fishx; RY2[7]=fishy; totalreflection=true; // r12=1.0; }else{ fishimagew=fishimageh=0; } r12=calr12(LX[1]-objx,objy); } if(Math.abs(imagex-fishx)<0.1)fishimageh=n1/n2*fishh; if(Math.abs(imagex-objx)<0.1)imageh=n1/n2*objh; ratio=(1.-r12*r12)*sangle; intensity=(int)(255.*(1-ratio)); if(intensity>255)intensity=255; else if(intensity<0)intensity=0; textI=l_transimission+dvalue(1.-r12*r12)+l_intensity+dvalue(ratio); color=new java.awt.Color(200,220,208,intensity); //color=new java.awt.Color(0,0,255,intensity);

    chinese

    Array