My only problem is that streamslice plots field lines equidistant to each other. But since the intensity of electric and magnetic fields in one area is directly proportional to the density of its field lines, I would like to have more field lines in areas with higher intensity and less or no field lines in areas with little intensity.
Since you can access the vector coordinates of the lines produced by streamslice, my idea was just to remove a few to make the line density approximately corresponding to the field intensity. Though I had no luck with this yet.
Any help and suggestions are appreciated
a few slices of ML code would help...
us
a=100;
b=10;
c=100;
d=sqrt(a^2 + c^2);
T=0.3;
[X,Y,Z]=meshgrid(0:1:a, 0:1:b, 0:1:c);
Hx= (a/d)*sin((pi*X)/a).*cos((pi*Z)/c).*sin(pi*T);
Hy= zeros(size(X));
Hz= -(c/d)*cos((pi*X)/a).*sin((pi*Z)/c).*sin(pi*T);
W= sqrt(Hx.^2 + Hz.^2);
slice(X,Y,Z,W,[],[b],[]);
[hverts haverts]= streamslice(X,Y,Z,Hx,Hy,Hz,[],[b],[],1,'linear');
hlines= streamline([hverts haverts]);
set(hlines,'LineWidth',3,...
'Marker','.',...
'MarkerSize',3,...
'MarkerFaceColor','k',...
'Color','k')
view(0,0),axis([0 a 0 b 0 c])