This is the notebook for a few bivector related illustrations.  The first is two circular representations of a bivector viewed from a 3D vantage point.  Another is a bivector addition figure, with two bivectors summed in 3D.  That figure was confusing (but cool), and has been left out of the book.  The last figure separates the space between those bivectors summed in the second figure showing the summands and the sum all distinct.  The current draft of the book includes this figure, but it is still a bit confusing.

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

ClearAll[circle, e1, e2, e3, o, bt];
o = {0,0,0};
{e1,e2,e3} = IdentityMatrix[3];
circle[ u_, v_, r_, t_]:= r(u Cos[t] + v Sin[t]);
bt = Style[#, FontSize -> 16] &;

p1 = Module[{asz, ucap1, vcap1,  ucap2, vcap2,rho, range},
asz = 0.05;
rho = 1;
ucap1 = {1,1,1};
vcap1 = Cross[ ucap1, e1] // Normalize;
ucap2 = ucap1;
vcap2 = -vcap1;
range = 2.2{-rho,rho};
{ParametricPlot3D[
-1.2e1 + circle[ucap1, vcap1, rho, t],{t,0,2π},
PlotStyle->Directive[Thick,Red],
PlotRange->{range, range, range},
Ticks -> None
] /. Line[pts_] :> {Arrowheads[{asz,asz,asz,asz,asz,0}],Arrow[Tube[pts,{0.02}],{0,.2}]}
,
ParametricPlot3D[
-1.2e1 + circle[ucap1, vcap1, r, t],{t,0,2π},{r,0,rho},
PlotStyle->Directive[Red//Lighter,Opacity[0.2]],
Mesh -> None
] 
,
ParametricPlot3D[
e1 + circle[ucap2, vcap2, rho, t],{t,0,2π},
PlotStyle->Directive[Thick,Blue]
] /. Line[pts_] :> {Arrowheads[{asz,asz,asz,asz,asz,0}],Arrow[Tube[pts,{0.02}],{0,.2}]},
ParametricPlot3D[
e1 + circle[ucap2, vcap2, r, t],{t,0,2π},{r,0,rho},
PlotStyle->Directive[Blue//Lighter,Opacity[0.2]],
Mesh -> None
],
Graphics3D[{
Text[bt["B"], -1.2 e1],
Text[bt["-B"], e1]
}]
}
] // Show

peeters`exportForLatex["circularBivectorsIn3DFig1", p1]

ClearAll[step, parallelogram, parallelogramarea, p2]
step[x_] := HeavisidePi[x-1/2];
(*Plot[step[x],{x,-2,2}]
Plot[step[x-1],{x,-2,2}]*)
(*parameterized over [0,4]*)
parallelogram[u_, v_, t_] := u t step[t] + step[t-1](u + (t-1)v ) + step[t-2](u + v - u (t-2)) + step[t-3](v - v (t-3));
(*parameterized over [0,1]*)
parallelogramarea[u_, v_, p1_, p2_] := u p1 + v p2;

p2 = Module[{asz, u1,v1,u2,v2, us, vs, range, origin},
asz = 0.05;
u1 = {1,1,1};
v1 = 1.5 (Cross[ u1, e1] // Normalize);
u2 = u1;
v2 = 3(Cross[ u1, e2] // Normalize);
us = u1;
vs = v1 + v2;
origin = -(u1+u2)/2;
range = 2{-1,1};
{ParametricPlot3D[
 origin+ parallelogram[v1, u1, t],{t,0,4},
PlotStyle->Directive[Thick,Red],
PlotRange->{{-4,1}, range, range},
Ticks -> None
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin+ parallelogramarea[u1, v1, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Red //Lighter,Opacity[0.5]],
Mesh -> None
] ,
ParametricPlot3D[
 origin+ v1 + parallelogram[v2, u2, t],{t,0,4},
PlotStyle->Directive[Thick,Blue]
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin+ v1+ parallelogramarea[u2, v2, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Blue //Lighter,Opacity[0.5]],
Mesh -> None
] ,
ParametricPlot3D[
 origin + parallelogram[us, vs, t],{t,0,4},
PlotStyle->Directive[Thick,Green]
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin + parallelogramarea[us, vs, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Green //Lighter,Opacity[0.15]],
Mesh -> None
] 
}
] // Show

peeters`exportForLatex["AdditionOfBivectorsFig1", p2]

p2a = Module[{asz, u1,v1,u2,v2, us, vs, range, origin},
asz = 0.05;
u1 = {1,1,1};
v1 = 1.5 (Cross[ u1, e1] // Normalize);
u2 = u1;
v2 = 3(Cross[ u1, e2] // Normalize);
us = u1;
vs = v1 + v2;
origin = -(u1+u2)/2;
range = 2{-1,1};
{ParametricPlot3D[
 origin+ parallelogram[v1, u1, t],{t,0,4},
PlotStyle->Directive[Thick,Red],
PlotRange->{{-4,1}, range, range},
Ticks -> None
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin+ parallelogramarea[u1, v1, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Red //Lighter,Opacity[0.5]],
Mesh -> None
] 
}
] // Show

p2b = Module[{asz, u1,v1,u2,v2, us, vs, range, origin},
asz = 0.05;
u1 = {1,1,1};
v1 = 1.5 (Cross[ u1, e1] // Normalize);
u2 = u1;
v2 = 3(Cross[ u1, e2] // Normalize);
us = u1;
vs = v1 + v2;
origin = -(u1+u2)/2;
range = 2{-1,1};
{
ParametricPlot3D[
 origin+ v1 + parallelogram[v2, u2, t],{t,0,4},
PlotStyle->Directive[Thick,Blue],
PlotRange->{{-4,1}, range, range}
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin+ v1+ parallelogramarea[u2, v2, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Blue //Lighter,Opacity[0.5]],
Mesh -> None
] 
}
] // Show

p3b = Module[{asz, u1,v1,u2,v2, us, vs, range, origin},
asz = 0.05;
u1 = {1,1,1};
v1 = 1.5 (Cross[ u1, e1] // Normalize);
u2 = u1;
v2 = 3(Cross[ u1, e2] // Normalize);
us = u1;
vs = v1 + v2;
origin = -(u1+u2)/2;
range = 2{-1,1};
{
ParametricPlot3D[
 origin + parallelogram[us, vs, t],{t,0,4},
PlotStyle->Directive[Thick,Green],
PlotRange->{{-4,1}, range, range}
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 origin + parallelogramarea[us, vs, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Green //Lighter,Opacity[0.15]],
Mesh -> None
] 
}
] // Show

p2 = Module[{asz, u1,v1,u2,v2, us, vs, range, origin,o2, x1, x2, x3, c1, c2, c3},
asz = 0.05;
u1 = {1,1,1};
v1 = 1.5 (Cross[ u1, e1] // Normalize);
u2 = u1;
v2 = 3(Cross[ u1, e2] // Normalize);
us = u1;
vs = v1 + v2;
origin = -(u1+u2)/2;
range ={-3,3};
o2 = e1-e3-e2;
x1 = origin;
c1 = x1 +(u1+v1)/2 ;
x2 = 2 (e1 +e2)+ origin+ v1 ;
c2 = x2 + (u2+v2)/2 ;
x3 = 4 e1 +5e2+ origin ;
c3 = x3 + (us + vs)/2;

{
ParametricPlot3D[
 x1+ parallelogram[v1, u1, t],{t,0,4},
PlotStyle->Directive[Thick,Red],
PlotRange->{1.5{-1,4}, {-4,6}, {-4,3}},
Ticks -> None
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 x1+ parallelogramarea[u1, v1, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Red //Lighter,Opacity[0.5]],
Mesh -> None
] ,
ParametricPlot3D[
 x2 + parallelogram[v2, u2, t],{t,0,4},
PlotStyle->Directive[Thick,Blue]
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
  x2+ parallelogramarea[u2, v2, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Blue //Lighter,Opacity[0.5]],
Mesh -> None
] ,
ParametricPlot3D[
  x3 + parallelogram[us, vs, t],{t,0,4},
PlotStyle->Directive[Thick,Green]
] /. Line[pts_] :> {Arrowheads[{asz}],Arrow[Tube[pts,{0.02}],{0,0}]},
ParametricPlot3D[
 x3 + parallelogramarea[us, vs, a, b],{a,0,1},{b,0,1},
PlotStyle->Directive[Green //Lighter,Opacity[0.15]],
Mesh -> None
],
Graphics3D[ {
(*Text["1"//bt,  c1 ],
Text["2"//bt,  c2 ],
Text["3"//bt,  c3],*)
Text["+"//bt,  (c1+c2)/2 ],
Text["="//bt,  (c2+c3)/2 ]
}]
} // Show
]

p4 = ;

peeters`exportForLatex["AdditionOfBivectorsFig2", p4]