Unit bivectors figures in R3.  unitBivectorsFig1.eps, unitBivectorsFig2.eps

<<peeters` ;
peeters`setGitDir[ "../project/figures/GAelectrodynamics" ]

ClearAll[e1, e2, e3, o, esub, etext, bivectors, arc]
o = {0,0,0};
{e1,e2,e3} = IdentityMatrix[3];
esub = Style[Subscript[Style["e", Bold],#], FontSize -> 16] &;
etext[i_, o_] := Text[esub[i], 0.5 IdentityMatrix[3][[i]] + o ];
etext[i_, j_, p_] := Text[Row[{esub[i], esub[j]}], p ];
(*sign doesn't work out: *)
(*arc[origin_, v1_, v2_, r_,c_, s_] := ParametricPlot3D[origin + r(v1 Cos[theta] + v2 Sin[theta]), {theta, 0, s(2 Pi-0.1)}] /.Line[x_]->{Arrowheads[0.04],c,Arrow[Tube[x]]}
*)
(* this arc is a generalization of : https://stackoverflow.com/a/5705490/189270 
The arrowhead looks a little weird though (it's not tangent to the direction of the circle)
*)
arc[origin_, v1_, v2_, r_, c_, limit_, a_] := Graphics3D[{c,Arrowheads[a],Arrow[Tube[Table[origin+ r(v1 Cos[t]+v2 Sin[t]),{t,0,limit,Sign[limit] Pi/100}]]]}]
(*arc[o,e1, e2,0.3, Black, 2Pi - 0.2]
arc[o,e1, e2,0.3, Black, -(2Pi - 0.2)]*)


bivectors[i1_, i2_, i3_, i4_, i5_, i6_, sign_] :=  Module[{s, t, ta, i, offset, arcrange},
i = IdentityMatrix[3];
s = 100;
t = 0.01;
ta = 0.05;
offset =0.25;
arcrange = sign(2Pi - 0.2);
Show[{

Graphics3D[{
Arrowheads[ta],
Red// Lighter // Lighter,
Parallelepiped[ offset(e1+e2), {i[[i1]],i[[i2]],-e3/s}],
Red//Darker,
Arrow[Tube[{o,e1}, t]],
(*Arrow[Tube[{e1,e1+e2}, t]],*)
Green// Lighter // Lighter,
Parallelepiped[ offset(e2+e3), {i[[i3]],i[[i4]],-e1/s}],
Green//Darker,
Arrow[Tube[{o,e2}, t]],
(*Arrow[Tube[{e2,e2+e3}, t]],*)
Purple// Lighter // Lighter,
Parallelepiped[ offset(e3+e1), {i[[i5]],i[[i6]],-e2/s}],
Purple//Darker,
Arrow[Tube[{o,e3}, t]],
(*Arrow[Tube[{e3,e3+e1}, t]],*)
Black,
etext[1, 0.1 e2],
etext[2, 0.1 e1],
etext[3,-0.1 e2],
etext[i1, i2, (0.5+offset)(e1+e2)],
etext[i3, i4, (0.5+offset)(e2+e3)],
etext[i5, i6, (0.5+offset)(e3 + e1)]
}],
arc[(0.5+offset)(e1+e2),e1, e2,0.3, Black, arcrange, 0.04],
arc[(0.5+offset)(e2+e3),e2, e3,0.3, Black, arcrange, 0.04],
arc[(0.5+offset)(e3+e1),e3, e1,0.3, Black, arcrange, 0.04]
}]
]

bivectors[1,2,2,3,3,1, 1]
bivectors[2,1,3,2,1,3, -1]

p1 = ;
p2 = ;

peeters`exportForLatex["unitBivectorsFig1", p1]
peeters`exportForLatex["unitBivectorsFig2", p2]

bivectorsDisk[i1_, i2_, i3_, i4_, i5_, i6_, sign_] :=  Module[{s, t, ta, i, offset, arcrange, radius},
i = IdentityMatrix[3];
s = 200;
t = 0.01;
ta = 0.05;
offset =0.25;
radius = 1/Sqrt[Pi];
arcrange = sign(2Pi - 0.2);
Show[{

Graphics3D[{
Arrowheads[ta],
Red// Lighter // Lighter,
Cylinder[ {(0.5+offset)(e1+e2)-e3/s,(0.5+offset)(e1+e2)+e3/s}, radius],
Red//Darker,
Arrow[Tube[{o,e1}, t]],
(*Arrow[Tube[{e1,e1+e2}, t]],*)
Green// Lighter // Lighter,
Cylinder[ {(0.5+offset)(e2+e3)-e1/s,(0.5+offset)(e2+e3)+e1/s}, radius],
Green//Darker,
Arrow[Tube[{o,e2}, t]],
(*Arrow[Tube[{e2,e2+e3}, t]],*)
Purple// Lighter // Lighter,
Cylinder[ {(0.5+offset)(e1+e3)-e2/s,(0.5+offset)(e1+e3)+e2/s}, radius],
Purple//Darker,
Arrow[Tube[{o,e3}, t]],
(*Arrow[Tube[{e3,e3+e1}, t]],*)
Black,
etext[1, 0.1 e2],
etext[2, 0.1 e1],
etext[3,-0.1 e2],
etext[i1, i2, (0.5+offset)(e1+e2)],
etext[i3, i4, (0.5+offset)(e2+e3)],
etext[i5, i6, (0.5+offset)(e3 + e1)]
}],
arc[(0.5+offset)(e1+e2),e1, e2,radius, Black, arcrange, 0.05],
arc[(0.5+offset)(e2+e3),e2, e3,radius, Black, arcrange, 0.05],
arc[(0.5+offset)(e3+e1),e3, e1,radius, Black, arcrange, 0.05]
}]
]

bivectorsDisk[1,2,2,3,3,1, 1]
bivectorsDisk[2,1,3,2,1,3, -1]

p3 = ;
p4 = ;
peeters`exportForLatex["unitBivectorsFig3", p3]
peeters`exportForLatex["unitBivectorsFig4", p4]

junk

(*p1 = Module[{s, t, ta, i},
i = IdentityMatrix[3];
s = 100;
t = 0.02;
ta = 0.1;
Show[{
Graphics3D[{
Arrowheads[ta],
Red// Lighter // Lighter,
Parallelepiped[ 0.1(e1+e2), {e1,e2,-e3/s}],
Red//Darker,
Arrow[Tube[{o,e1}, t]],
Arrow[Tube[{e1,e1+e2}, t]],
Green// Lighter // Lighter,
Parallelepiped[ 0.1(e2+e3), {e2,e3,-e1/s}],
Green//Darker,
Arrow[Tube[{o,e2}, t]],
Arrow[Tube[{e2,e2+e3}, t]],
Purple// Lighter // Lighter,
Parallelepiped[ 0.1(e3+e1), {e3,e1,-e2/s}],
Purple//Darker,
Arrow[Tube[{o,e3}, t]],
Arrow[Tube[{e3,e3+e1}, t]],
Black,
etext[1, 0.1 e2],
etext[2, 0.1 e1],
etext[3,-0.1 e2],
etext[1, 2, 0.6(e1+e2)],
etext[2, 3, 0.6(e2+e3)],
etext[3, 1, 0.6(e3 + e1)]
}]
}]
]

p2 = Module[{s, t, ta},
s = 100;
t = 0.02;
ta = 0.1;
Show[{
Graphics3D[{
Arrowheads[ta],
Red// Lighter // Lighter,
Parallelepiped[  0.1(e1+e2), {e1,e2,-e3/s}],
Red//Darker,
Arrow[Tube[{o,e2}, t]],
Arrow[Tube[{e2,e1+e2}, t]],
Green// Lighter // Lighter,
Parallelepiped[  0.1(e2+e3), {e2,e3,-e1/s}],
Green//Darker,
Arrow[Tube[{o,e3}, t]],
Arrow[Tube[{e3,e2+e3}, t]],
Purple// Lighter // Lighter,
Parallelepiped[ 0.1(e3+e1), {e3,e1,-e2/s}],
Purple//Darker,
Arrow[Tube[{o,e1}, t]],
Arrow[Tube[{e1,e3+e1}, t]],
Black,
etext[1, 0.1 e2],
etext[2, 0.1 e1],
etext[3,-0.1 e2],
etext[2, 1, 0.6(e1+e2)],
etext[3, 2, 0.6(e2+e3)],
etext[1, 3, 0.6(e3 + e1)]
}]
}]
]*)