我有一个使用opengl绘制Bresenham线的基本代码。问题是,最终它并没有显示结果。只有窗口打开和关闭迅速,没有任何其他错误。有人能帮我吗?Called by mouse(), will call the appropriate function depending on the length of the X and Y axis else}
/
我已经用python实现了维基百科中的,但对于某些行,它不能工作,比如从1,0到0,1它不会停止,并继续生成超长的行 dx = x1 - x0 sx = x0 < x1 and 1 or -1 err = dx - dy
x, y = x0, y0 points += [(x, y)]
if x == x1 an