changes:

redesign the way the scalar-Field is calculated using a dynamic way that is always correct and to scale instead of the older way of 2 separate scalar-field.
[code]for(int j=0;j  for(int k=0;k  zsum[j][k]=0;
  }
}


for(int i=0;i yc=yi+i*dy; // lay the source in y
ycc[i] = yi+i*dy; // by lookang for drawing source

for(int j=0;j //  if (x    x=xmin+j*d;
//    }
//    else if (x>x1){
//  x=x1+j*d;
  // r=x-x1; // r is distance from array point x to slit position x1
//  x2=(x-xc)*(x-xc);
//  }
  for(int k=0;k  y=ymin+k*d;
 
  if (x      r=x-x1; // r is distance from array point x to slit position x1
      zsum[j][k]=Math.sin(kw*r-omega*t)*n; // need n to compensate for the magnitude
    }
  else if (x>=x1){
  r=Math.sqrt((x-xc)*(x-xc)+(y-yc)*(y-yc));
  zsum[j][k]+=Math.sin(kw*r-omega*t);
  }
 
  }
}
}[/code]
add ns to n and draw the sources with checkbox
add wavelength and drawing checkbox etc
add width and checkbox
add type and colormode for different visualization especially cool is the 3D view that required a square array [200][200]
add step of step by step animation

enjoy!