# delete existing attribute select('LC attribute'); delete; # define x/y/z x = 0; y = 0; z = linspace(0e-6,5e-6,100); X = meshgrid3dx(x,y,z); Y = meshgrid3dy(x,y,z); Z = meshgrid3dz(x,y,z); n = matrix(length(x),length(y),length(z),3); # define the orientation function n(1:length(x),1:length(y),1:length(z),1) = cos(Z*pi*1e5); n(1:length(x),1:length(y),1:length(z),2) = sin(Z*pi*1e5); n(1:length(x),1:length(y),1:length(z),3) = 0; # create dataset containing orientation vectors and position parameters LC=rectilineardataset("LC",x,y,z); LC.addattribute("u",n); # add LC import grid attribute addgridattribute("lc orientation",LC); setnamed("LC attribute","nz",50); # set resolution