(* Following and modifying Section 3.12 in  "The fuzzy space construction kit" by Andreas Sykora
Change step to 1/100 and uncomment final commands to make the video.
Compress in linux with
ffmpeg -i lowering_genus.avi -vcodec msmpeg4v2 -q:v 5 lowering_genus_cmprsd.avi.avi
*)

Clear[r]

n=6;

V ={{8/10,1,1,0,0,0},{0,0,0 ,1,0,0},{0,0,16/10,r,1,0},{0,0,0,8/10,0,1},{0,0,0,0,24/10,1},{0,0,0,0,0,16/10}};

MatrixForm[V]

Z = (1/10)*{{0,0,0,0,0,0},{0,13,0,0,0,0},{0,0,13,0,0,0},{0,0,0,26,0,0},{0,0,0,0,26,0},{0,0,0,0,0,39}};

MatrixForm[Z]

X = (1/2)*ConjugateTranspose[V]+(1/2)*V;

MatrixForm[X]

Y = (I/2)*ConjugateTranspose[V]-(I/2)*V;

0

MatrixForm[Y]

sigma1 = {{0,1}, {1,0}};

sigma2 = {{0,-I},{I,0}};

sigma3 = {{1,0},{0,-1}};

loclzr = KroneckerProduct[sigma1, X- x*IdentityMatrix[n]] + 
KroneckerProduct[sigma2,Y-y*IdentityMatrix[n]]+ 
KroneckerProduct[sigma3, Z-z*IdentityMatrix[n]] ;

charpoly = Det[loclzr];

step = 1/6;

plots=ParallelTable[ContourPlot3D[charpoly== 0, {x,-1,3}, {y,-1, 1}, {z, 0,4},Contours->{{1,LightBlue}},PlotPoints->100,ViewPoint->{2,-18,2}],{r,0,1,step}]

Export["lowering_genus_1.eps",plots[[4]],ImageSize->3.2*72];

Export["lowering_genus_2.eps",plots[[5]],ImageSize->3.2*72];

Export["lowering_genus_3.eps",plots[[6]],ImageSize->3.2*72];

Export["lowering_genus_4.eps",plots[[7]],ImageSize->3.2*72];

(*plotsall = Join[plots,Reverse[plots]];*)

(*Export["lowering_genus.avi",plotsall]*)