
синие числа соответствуют индексу позиции
Это было создано с помощью этого скрипта:
Код: Выделить всё
# u v parameters allow to define how many points according to x and y
u, v = (3, 3)
x = np.linspace(0, 2, u)
y = np.linspace(0, 1, v)
# meshgrid used to create a grid out of several arrays
xx, yy, zz = np.meshgrid(x, y, 0)
# reshaping matrix
coords = np.dstack((xx,yy,zz))
coords = np.vstack(coords)

что-то вроде:
Код: Выделить всё
[[0 1 4 3]
[1 2 5 4]
[3 4 7 6]
[4 5 8 7]]
Код: Выделить всё
listing = np.array([((u)*j+i, (u)*j+i+1, (u)*j+i+u+1, (u)*j+i+u) for j in range(v-1) for i in range(u-1)])
Подробнее здесь: https://stackoverflow.com/questions/786 ... st-with-nu