  We consider N = 3 supersymmetric Chern-Simons gauge theories with product
unitary and orthosymplectic groups and bifundamental and fundamental fields. We
study the partition functions on an S^3 by using the Kapustin-Willett-Yaakov
matrix model. The saddlepoint equations in a large N limit lead to a constraint
that the long range forces between the eigenvalues must cancel; the resulting
quiver theories are of affine Dynkin type. We introduce a folding/unfolding
trick which lets us, at the level of the large N matrix model, (i) map quivers
with orthosymplectic groups to those with unitary groups, and (ii) obtain
non-simply laced quivers from the corresponding simply laced quivers using a
Z_2 outer automorphism. The brane configurations of the quivers are described
in string theory and the folding/unfolding is interpreted as the
addition/subtraction of orientifold and orbifold planes. We also relate the
U(N) quiver theories to the affine ADE quiver matrix models with a
Stieltjes-Wigert type potential, and derive the generalized Seiberg duality in
2 + 1 dimensions from Seiberg duality in 3 + 1 dimensions.
