For typical machine part, maximum dimension changes are of only a one-thousandth of the part length.
对于典型的机械部分,最大尺寸的变化是只有长度部分的千分之一。
The next four lines restrict the movement of the mouse to the maximum distance from the center in each dimension.
接下来的四行代码将鼠标移动限制为从每个维度中心移动的最大距离。
First we pick a random cell — or actually we pick one more than the cell itself in each dimension, since.shape gives us the length rather than the maximum index.
首先我们选择一个随机的单元——或者实际上我们选取的是单元本身在每一维度上的索引值加上1,因为我们通过. shape调用得到的是长度而不是最大的索引值。
应用推荐