(ax, scale)
| 29 | |
| 30 | |
| 31 | def plot_cuboid(ax, scale): |
| 32 | # plot a rectangular cuboid with side lengths given by scale (x, y, z) |
| 33 | r = [0, 1] |
| 34 | pts = itertools.combinations(np.array(list(itertools.product(r, r, r))), 2) |
| 35 | for start, end in pts: |
| 36 | if np.sum(np.abs(start - end)) == r[1] - r[0]: |
| 37 | ax.plot3D(*zip(start*np.array(scale), end*np.array(scale))) |
| 38 | |
| 39 | |
| 40 | @check_figures_equal() |
no outgoing calls
no test coverage detected
searching dependent graphs…