Skip to main content
Became Hot Network Question
edited body
Source Link
Vitaliy Kaurov
  • 74.9k
  • 9
  • 212
  • 380

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a pleasing 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a pleasing 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a pleasing 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

added 2 characters in body
Source Link
Yaroslav Bulatov
  • 7.7k
  • 2
  • 22
  • 50

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a staticpleasing 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a static 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a pleasing 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

added 3 characters in body
Source Link
Yaroslav Bulatov
  • 7.7k
  • 2
  • 22
  • 50

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation belowvertically into a coherentstatic 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation below into a coherent 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

What's the best way to use Mathematica built-in tools to stack multiple frames of a ListAnimation vertically into a static 3D picture?

ClearAll["Global`*"]; SeedRandom[1]; d = 4; (* dimensions *) numSteps = 75; (* number of rotation steps per frame *) numFrames = 25; (* number of frames *) (* isoclinic rotation of theta in the basis of P *) isoclinic[theta_, P_] := Module[{simple, composite, R}, simple = Table[R[i] -> RotationMatrix[theta], {i, d/2}]; composite = ArrayFlatten[DiagonalMatrix[Array[R, d/2]] /. simple]; P . composite . P\[Transpose] ]; (* list of eigenvalues obtained from rotating given matrix in basis P \ *) eigenTrajectory[mat_, P_] := ( Table[ Eigenvalues[mat . isoclinic[theta, P]], {theta, 0, 2 Pi, 2 Pi/numSteps}] ); (* Random basis *) P0 = RandomVariate@CircularRealMatrixDistribution@d; (* random complex matrix with eigenvalues approximately in unit \ circle *) genMat := RandomVariate[NormalDistribution[], {d, d}]; mat = (genMat + I genMat)/Sqrt[2 d]; plot[vals_] := ComplexListPlot[vals, PlotRange -> 1.2*{-1 - I, 1 + I}, Axes -> None]; curveFrames = Table[plot[ Flatten@eigenTrajectory[mat, isoclinic[theta, P0]]], {theta, 0, 2 Pi, 2 Pi/numFrames}]; ListAnimate[curveFrames] 

enter image description here

Background:

Source Link
Yaroslav Bulatov
  • 7.7k
  • 2
  • 22
  • 50
Loading