何谓对称DDA? [英] what is meant by symmetric DDA?

查看:322
本文介绍了何谓对称DDA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看了一下 DDA 。但我只是遇到了短期的对称DDA 的。它是什么 ?它是如何从不同的 DDA 的?

I have read about DDA. But I just came across the term symmetric DDA. What is it ? How is it different from DDA ?

推荐答案

多哈发展议程(数字微分分析仪)算法来找出任何给定的两个点,线性(即直线)之间的插值点。现在,因为这是要在数字计算机上完成 - 速度的一个重要因素。

The DDA (Digital Differential Analyzer) algorithm is used to find out interpolating points between any given two points, linearly (i.e. straight line). Now since this is to be done on a digital computer - speed is an important factor.

的直线的方程由米=ΔX/ΔY当量(i),其中ΔX= X(2)-x(1)及给定的; ΔY= Y(2)-y(1),
现在用这方程,我们可以计算该躺在线的连续点。但随后这就是光栅图形离散的世界 - 所以,我们需要整体坐标

The equation of a straight line is given by m=Δx/Δy eq(i), where Δx = x(2)-x(1) & Δy = y(2)-y(1),
now using this equation we could compute successive points that lie on the line. But then this is the discrete world of raster graphics - so we require integral coordinates.

在简单的DDA EQ(I)转化为M =eΔx/eΔy,其中的电子邮件,称之为增量因素,是一个正实数。因为把相同数量的分子和分母不会改变任何东西 - 但如果适当的选择 - 它可以帮助我们在产生离散的点,从而降低其四舍五入产生的点的过载

In simple DDA eq(i) is transformed to m=eΔx/eΔy where e, call it the increment factor, is a positive real number. since putting the same number in numerator and denominator does not change anything - but if suitably chosen - it can help us in generating discrete points thereby reducing the overload of having to round off the resultant points.

基本上我们需要做的是:由一个固定的少量增加的坐标,从起点开始,每一次,我们有一个新的起点逐步迈向终点。

Basically what we need to do is: increment the coordinates by a fixed small amount, beginning from the starting point, and each time we have a new point progressing towards the end point.

在简单的DDA - 的电子的选择为1 /最大值(|ΔX|,|ΔY|),使得的坐标之一积分,只有其他坐标必须是圆形的。即P(I + 1)= P(I)+(1,圆形(例如*ΔY))这里一个坐标被递增1,而另一个通过e *ΔY

In simple DDA - e is chosen as 1/max(|Δx|,|Δy|) such that one of the coordinate is integral and only the other coordinate has to be rounded. i.e. P(i+1) = P(i)+(1,Round(e*Δy)) here one coordinate is being incremented by 1 and the other by e*Δy

在对称DDA - 的电子的被选择为使得虽然的两个坐标所得的点已被四舍五入,也可以非常有效地这样做,从而迅速。

In symmetric DDA - e is chosen such that though both the co-ordinates of the resultant points has to be rounded off, it can be done so very efficiently, thus quickly.

具体的电子的选择为1/2 ^ n,其中2 ^(N-1) - = MAX(|ΔX|,|ΔY|)< 2 ^ N。换句话说,该线的长度取为2的n次方对齐。两个坐标的增量是E *ΔX和E *ΔY。与一开始的适当选择的初始分数部分坐标:这导致产生为混合的级分,其小数部分是在一个的环状系列下,即它们重复在小长度的点。基于两个固定长度的查找表,每一个坐标所得的坐标可以由此容易进行四舍五入。

Specifically e is chosen as 1/2^n where 2^(n-1) <= max(|Δx|,|Δy|) < 2^n. In other words the length of the line is taken to be 2^n aligned. The increments for the two coordinates are e*Δx and e*Δy. With suitably chosen initial fraction part of the beginning coordinates: this causes the points to be generated as mixed fractions whose fractional parts are in a cyclic series, i.e. they repeat over a small length. The resultant coordinates can thus easily be rounded off based on two fixed length look-up tables, one for each coordinate.

HTTP://w3.msi.vxu。 SE /〜GSU / DAB726-HT06 / SYMM-DDA.pdf 一个例子。
注意在所得到的坐标的小数部分的循环重复

refer http://w3.msi.vxu.se/~gsu/DAB726-Ht06/Symm-DDA.pdf for an example.
Notice the cyclic repetition in the fractional part of the resultant coordinates.

这篇关于何谓对称DDA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆