
n = 50;

grid = linspace(-2,2,n);


printf(" %i", [n,n,n]);
printf("\n");
      
for z = grid
  for y = grid
    for x = grid
      r = sqrt(x^2 + y^2 + z^2);
      if r>1
	v = [1 + 0.5/r^3 - 1.5*x^2/r^5, -1.5*x*y/r^5, -1.5*x*z/r^5];
      else
	v = [0,0,0];
      endif
      printf(" %g", v);
      printf("\n");
    endfor
  endfor
endfor
