# Randomly oriented ellipses in rows and columns

I should plot randomly oriented ellipses in rows and columns, at fixed nodes. Some rows should be grey, some black. Result should look like the following image (texture drawn by hand): I moved from a code like this:

dimensiontex = {400, 300};
nobj = 40; distanceobj = 5;
myrow = Table[{i, j}, {i, 1, nobj, distanceobj}, {j, 1, nobj,
distanceobj}];

myobj = Graphics[Disk[{1, 1}, Offset[{10, 4}]]];
rotatemyobj = Rotate[myobj, RandomReal[{0, 2 Pi}]];
mytexture =
ListPlot[myrow, Axes -> False, ImageSize -> {dimensiontex[],dimensiontex[]},
AspectRatio -> 1, PlotMarkers -> rotatemyobj]


but obviously the "random" orientation is the same for all objects and all rows are evenly spaced: I guess I should use a Do loop, but how to manage rotation of the single ellipse? Any help is greatly appreciated

Here's one way:

dimensiontex = {400, 300};
nobj = 40; distanceobj = 5;
greys = RandomReal[{0, 1}, nobj];
rotatemyobj[c_] := Rotate[Graphics[{GrayLevel[c], Disk[{1, 1}, Offset[{10, 4}]]}], RandomReal[{0, 2 Pi}]];
tab = Table[rotatemyobj[greys[[i]]], {i, 1, nobj, distanceobj}, {j, 1, nobj, distanceobj}];
GraphicsGrid[tab] Thanks to Rahul for more concise syntax.

rowEl[n_, color_] :=
Rotate[Graphics@{color, Disk[{1, 1}, Offset[{10, 4}]]}, #] & /@
RandomReal[{0, Pi}, n];
GraphicsGrid[
rowEl @@@
Transpose@{ConstantArray[5, 5], RandomChoice[{Black, Gray}, 5]}] Alternatively, if you want to have finer control of distances between, you can avoid GraphicsGrid

rowEl2[n_, y_, color_] :=
Graphics[{color,
Rotate[Disk[{1 + 4 #1, 4 (y - 1)}, {1, 0.4}], #2] & @@@
Transpose@{Range[n], RandomReal[{0, Pi}, n]}}];
Show[rowEl2[5, #1, #2] & @@@
Transpose@{Range, RandomChoice[{Black, Gray}, 5]}] 