立方体を平面で切った場合にできる断面図 

```python
import numpy as np
from mpl_toolkits.mplot3d.art3d import Poly3DCollection, Line3DCollection
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.art3d as art3d

tList = [0, 0.25, 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0]
axList = []
for i, t in enumerate(tList):

    if 0 <= t and t <=1:
        points = np.array([[0, 0, 0],
                          [1, 0, 0],
                          [1, 1, 0],
                          [0, 1, 0],
                          [0, 0, 1],
                          [1, 0, 1],
                          [1, 1, 1],
                          [0, 1, 1],
                          [t, 0, 0],
                          [0, t, 0],
                          [0, 0, t]])
        Z = points
        fig = plt.figure()
        ax = fig.add_subplot(111, projection='3d')
 
        ax.add_line(art3d.Line3D([t, 0], [0, 0], [0, t], color='k'))
        ax.add_line(art3d.Line3D([0, 0], [0, t], [t, 0], color='k'))
        ax.add_line(art3d.Line3D([t, 0], [0, t], [0, 0], color='k'))
        axList.append(ax)
        
    elif 1 < t and t < 2:
       
        points = np.array([[0, 0, 0],
                          [1, 0, 0],
                          [1, 1, 0],
                          [0, 1, 0],
                          [0, 0, 1],
                          [1, 0, 1],
                          [1, 1, 1],
                          [0, 1, 1],
                          [t, 0, 0],
                          [0, t, 0],
                          [0, 0, t],
                          [t-1, 1, 0],
                          [1, t-1, 0],
                          [1, 0 , t-1],
                          [t- 1, 0, 1],
                          [0, t-1, 1],
                          [0, 1, t-1]])
        Z = points
        fig = plt.figure()
        ax = fig.add_subplot(111, projection='3d')

        ax.add_line(art3d.Line3D([t, 0], [0, 0], [0, t], color='c'))
        ax.add_line(art3d.Line3D([0, 0], [0, t], [t, 0], color='c'))
        ax.add_line(art3d.Line3D([t, 0], [0, t], [0, 0], color='c'))
        ax.add_line(art3d.Line3D([1, 1], [0, t - 1], [t - 1,  0 ], color='k'))
        ax.add_line(art3d.Line3D([1, t - 1], [t - 1, 1], [0,  0 ], color='k'))
        ax.add_line(art3d.Line3D([t - 1, 0], [1, 1], [0, t - 1], color='k'))
        ax.add_line(art3d.Line3D([0, 0], [1,  t - 1], [t - 1, 1], color='k'))
        ax.add_line(art3d.Line3D([0, t - 1], [t - 1,  0], [1, 1], color='k'))
        ax.add_line(art3d.Line3D([t - 1, 1], [0,  0], [1, t - 1], color='k'))
        axList.append(ax)

    elif 2 <= t and t <= 3:

        points = np.array([[0, 0, 0],
                           [1, 0, 0],
                           [1, 1, 0],
                           [0, 1, 0],
                           [0, 0, 1],
                           [1, 0, 1],
                           [1, 1, 1],
                           [0, 1, 1],
                           [t, 0, 0],
                           [0, t, 0],
                           [0, 0, t],
                           [1, t - 2, 1],
                           [1, 1, t - 2],
                           [t - 2, 1 , 1]])
        Z = points
        fig = plt.figure()
        ax = fig.add_subplot(111, projection='3d')

        ax.add_line(art3d.Line3D([t, 0], [0, 0], [0, t], color='c'))
        ax.add_line(art3d.Line3D([0, 0], [0, t], [t, 0], color='c'))
        ax.add_line(art3d.Line3D([t, 0], [0, t], [0, 0], color='c'))
        ax.add_line(art3d.Line3D([1, 1], [t - 2, 1], [1,  t - 2], color='k'))
        ax.add_line(art3d.Line3D([1, t - 2], [1, 1], [t - 2, 1], color='k'))
        ax.add_line(art3d.Line3D([t - 2, 1], [1, t - 2], [1, 1], color='k'))
        axList.append(ax)

    axList[i].scatter3D(Z[:, 0], Z[:, 1], Z[:, 2])

    verts = [[Z[0],Z[1],Z[2],Z[3]],
             [Z[4],Z[5],Z[6],Z[7]],
             [Z[0],Z[1],Z[5],Z[4]],
             [Z[2],Z[3],Z[7],Z[6]],
             [Z[1],Z[2],Z[6],Z[5]],
             [Z[4],Z[7],Z[3],Z[0]]]

    axList[i].add_collection3d(Poly3DCollection(verts, facecolors='white', linewidths=1, edgecolors='r', alpha=.20))
    axList[i].set_title("t = {}".format(t))
    axList[i].view_init(elev=30, azim=45)

plt.show()
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/baf2ce6e-9b3f-2d51-daaf-3065acb5789a.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/c3fc4733-afcd-0445-b493-f501443f44f5.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/22eda8ec-7dd1-d3c4-0c78-2a951a28cfd3.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/726adbd4-4889-7ec3-9a93-b56ea198fe5a.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/0e9aed98-08de-16db-21ee-d5f7539f3851.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/b23086da-43b8-ffb2-2adb-7bc2923cd137.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/4a5933f1-9981-9bcf-19b3-a83ca6f06af5.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/421de11d-3488-c146-a7d0-21190a278ed7.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/2bacd706-6c75-1e9d-3d77-78b091c258e0.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/0cc06dd9-8146-37f2-1c51-2b36ce5d9e17.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/38a63bc4-c408-b505-cd5a-01ec456f1fd9.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/47b06950-e837-3857-f74c-746052d5ae03.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/104697/4d42fc9e-1f73-c773-4a26-4840436d7c3d.png)