SharedThe Geometry of Markov Chains.sagewsOpen in CoCalc
The Geometry of Markov Chains

The fuction that does the transformations is hidden in the next cell. If you want to play around at the bottom of this ws just run the cell first. Feel free to copy the code for your own purposes.

3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
T = matrix([[1/2,1/2,0],[1/4,1/2,1/4],[0,1/2,1/2]])
polygon3d([(1,0,0),(0,1,0),(0,0,1)], opacity=0.3) + sum([line3d([(T^k)[0]+k*vector([0.0001,0.0001,0.0001]),(T^k)[2]+k*vector([0.0001,0.0001,0.0001])], thickness = 2*k, color = Colors[mod(k-1,len(Colors))]) for k in [1..6]])

3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
3D rendering not yet implemented
T = matrix([[1,0,0],[1/8,7/8,0],[1/8,0,7/8]])
show(T.transpose())
repeated_transform(T,25)

3D rendering not yet implemented
T = matrix([[1,0,0],[0,7/8,1/8],[1/8,0,7/8]])
show(T.transpose())
repeated_transform(T,20)

3D rendering not yet implemented
T = matrix([[7/8,0,1/8],[0,7/8,1/8],[1/8,0,7/8]])
show(T.transpose())
repeated_transform(T,20)

3D rendering not yet implemented
T = matrix([[1,0,0],[0,9/10,-1/10],[0,1/10,9/10]])
show(T.transpose())
repeated_transform(T,50)

3D rendering not yet implemented