"制图与QUOT;在离散的x-y步骤的电弧电弧、步骤、QUOT

2023-09-11 06:21:10 作者:发奋图强

什么是划出一道弧线仅使用XY位置运动的最佳方法是什么?例如,让我们说我要画一个半径4的圆形点(4,4)处。让我们看到了我的抽屉开始在(4,0),并在每个方向.1措施的决议。我怎么会创造​​运动的顺序来完成一圈?

What's the best way to draw an arc using only x-y position movements? For example let's say I want to draw a circle with radius 4 at point (4,4). Let's saw my "drawer" starts at (4,0) and a resolution of .1 steps in each direction. How would I create a sequence of movements to complete the circle?

如果说不清楚,我可以尝试解释更好。

If that's not clear I can try to explain better.

推荐答案

如果我正确地理解你的问题,你正在寻找布氏算法。你可以阅读一下此处,例如。

If I understand your question properly, you are looking for Bresenham's algorithm. You can read about it here, for example.