here's a grid OSL shader I wrote a while back.
/*
Grid Lines
: Author Dealga McArdle, 2013
: modified from Sine Stripes by Thomas Dinges
example shaders:
http://www.openshading.com/osl/example-shaders/
*/
#include "stdosl.h"
shader GridShaderUV(
// input and output parameters
vector Vector = P,
color GridColor = color(0.8),
float Intensity = 1.0,
float Distance_U = 0.02,
float Distance_V = 0.02,
int Stripes_U = 10,
int Stripes_V = 10,
output float Fac = 1.0,
output color Color = color(0.8),
float World_X = 1.0,
float World_Y = 1.0
)
{
// shader code
point Pos = Vector;
Pos[0] -= World_X;
float pattern_col = 0.0;
for(int i = 0; i < Stripes_U; ++i ) {
Pos[0] += Distance_U;
pattern_col += abs(Intensity / Pos[0] / 1000.0);
}
Pos = Vector;
Pos[1] -= World_Y;
for(int i = 0; i < Stripes_V; ++i ) {
Pos[1] += Distance_V;
pattern_col += abs(Intensity / Pos[1] / 1000.0);
}
color C = transformc("hsv", GridColor);
Fac = pattern_col;
Color = color("hsv", C[0], C[1], (Fac*C[2]));
}
It generates a grid of black vs some user defined colour. There are many ways to use it, but to get a feel for it I suggest sticking it as a material on a Plane, and see what the sliders do.
If you add a Suzanne, you could set the Stripes U and V to 1 so there's only one grid line, then animate the Distance X between the extents of your object., and you'll get the laser scan effect. Or animate the WORLD X,Y as they are the center of the shader's coordinate system.


Looks like this

It's a grid osl, therefore capable (and intended) to make grids.

Alternatively, xyz banding
remove the axis you don't need. You can offset the Geometry position by some vector amount if the missing Axis band (0,0,0) bothers you

