function B=BiotSavart(Q,R);
//Q = (Nq,[x,y,z,qx,qy,qz]);
//R = (Nr,[x,y,z]);
// Nq == Nr is supposed.
if size(Q,1)==1
    Q=ones(size(R,1),1)*Q;
end;
R=R-Q(:,1:3);
Q=Q(:,4:6);
R3=sum(R.^2,2).^1.5;
R3=R3*ones(1,3);
B=zeros(size(Q,1),3);
B(:,1)=Q(:,2).*R(:,3)-Q(:,3).*R(:,2);
B(:,2)=Q(:,3).*R(:,1)-Q(:,1).*R(:,3);
B(:,3)=Q(:,1).*R(:,2)-Q(:,2).*R(:,1);
B=B./R3*1e-7;
endfunction


