Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我有 2 个瓷砖。这是矩阵:
0,0,0,0,2 0,0,0,0,0 1,0,0,0,0
如何自动从 1 到点 2 画一条线?
最终结果将是这样的:
0,0,0,1,2 0,1,1,0,0 1,0,0,0,0
使用Bresenham 的线算法