Professional Documents
Culture Documents
Research Article
A Comparison of Standard One-Step DDA Circular
Interpolators with a New Cheap Two-Step Algorithm
Leonid Moroz,1 Jan L. CieVliNski,2 Marta Stakhiv,1 and Volodymyr Maksymovych1
1
2
Lviv Polytechnic National University, S. Bandery Street 12, Lviv 79013, Ukraine
Uniwersytet w Biaymstoku, Wydzia Fizyki, ul. Lipowa 41, 15-424 Biaystok, Poland
1. Introduction
2. DDA Algorithms
(1)
= cos sin .
Advantages of DDA algorithms include simplicity and high
speed in generating circle point coordinate +1 , +1 .
Substituting = = 2 , where is an integer (usually
3), we rewrite (1) as
+1 = cos + sin ,
+1 = cos sin ,
(2)
cos sin
].
sin cos
(3)
Another second order scheme, different form truncated Taylor series, is proposed in [2]:
xn , yn
+1 = (1
2
3
) + ( ) ,
2
4
+1 = (1
2
3
) ( ) ,
2
4
xn+1 , yn+1
det = 1
(7)
4 6
+ .
4 16
To avoid expensive computation of trigonometric functions DDA algorithms use simpler (cheaper) expressions
instead of cos and sin . For example, by replacing trigonometric functions by truncated Taylor series one gets socalled simultaneous DDA algorithms [3]. The determinant of
the rotation matrix is 1. Matrices of DDA algorithms have
different determinants and det 1 only approximately.
The closer it equals 1 the more accurate is the corresponding
circular interpolator [2]. Approximating cos 1 and sin
, we obtain the simplest (and least accurate) DDA algorithm
[2, 11]:
+1 = + ,
+1 = ,
2
) + ,
2
det = 1 + .
(4)
+1 = (1
det = 1 +
+1 =
+1
4 2
4
=
.
4 + 2 4 + 2
+1
2
) ,
2
4
.
4
2
4 2
,
4 + 2
2
2
3
= (1 ) ( ) ,
2
6
4 6
+ .
4 36
3
4
.
4 + 2
4
(10)
2
3
) + ( ) ,
2
8
+1 = (1
2
3
) ( ) ,
2
8
(5)
det = 1 +
(11)
6
.
64
2
3
= (1 ) + ( ) ,
2
6
det = 1
(9)
However, implementation of these algorithms requires floating point operations [7]. Replacing the coefficients of (9) with
the first two terms of Taylor series [2], we obtain
4 2
4
+
,
4 + 2 4 + 2
(8)
+1 = + ,
(6)
+1 = (1 2 ) ,
det = 1.
(12)
=3
3.972
0.012
0.41 2
0.012
0.12 4
0.262
0.262
0.063
2.677
0.18 7
=5
3.332
0.771 3
0.257 3
0.771 3
0.47 7
0.253
0.252
0.015
3.020
0.31 6
=6
3.234
0.192 3
0.641 4
0.192 3
0.29 8
0.251
0.251
0.781 2
3.079
0.12 5
2
) + ,
2
+1 = +1 ,
+1 = +1 ,
+2 = +1 + +2 ,
+1 = (1
(13)
(14)
2
) +1 .
2
(15)
Two-step algorithm:
+2 = +1 cos ,
or 22+3 .
= 12
3.142
0.468 7
0.156 7
0.468 7
0.17 15
0.250
0.250
0.122 3
3.140
0.49 2
(16)
+2 = + 2 sin +1 .
(18)
+1 = cos + sin ,
(19)
+2 = +1 cos +1 sin ,
+2 = +1 cos + +1 sin .
(20)
+1 =
+1
(21)
(17)
Since the CNC systems radius can reach value max = 108
BLU, the CNC interpolators angles range = = 2 ,
where = 3, 12 overlapping all possible radius values range
(the though adopted algorithms can work and at > 12).
= 10
3.145
0.749 6
0.25 6
0.74 6
0.45 13
0.250
0.250
0.48 3
3.136
0.30 3
+2 = 2 sin +1 ,
+2 = +1 cos
=8
3.159
0.120 4
0.400 5
0.120 4
0.11 10
0.250
0.250
0.195 2
3.124
0.19 4
(22)
+2 +
,
2 cos
+1 =
+2 +
.
2 cos
(23)
Number of algorithms
(5)
(6)
(7)
(11)
=5
0.1973
0.657 1
0.1972
0.12 4
=6
0.984 1
0.328 1
0.984 1
0.15 5
+1
xn+2 , yn+2
yn+2
xn+1 , yn+1
yn+1
+2
,
2 sin
+1 =
+2
,
2 sin
(25)
xn , yn
yn
+2 = + 2 +1 ,
= 2 ,
= 2 ,
(26)
= 12
0.153 2
0.511 3
0.153 2
0.57 11
(24)
= 10
0.614 2
0.205 2
0.614 2
0.37 9
=8
0.246 1
0.818 2
0.246 1
0.23 7
xn+2
xn+1
xn
Right Shift
Register 1
Right Shift
Register 2
Round
Register 1
xn+1
Register 2
xn
Round
xn+2
Output
yn+2
Output
Register 3
yn+1
Register 4
yn
= 32,
= 3, . . . , 10,
(27)
1
= 2 ,
Correct bits
Number of results
5
Table 4: Maximum values of the absolute radial error ( = 22+3 )
for proposed Algorithm (26).
Absolute radial error
10
(m)
Proposed (26)
Well-known (11)
23
21
19
17
15
13
11
9
Correct bits
Number of results
Correct bits
Number of results
3
4
5
6
7
8
9
10
10
= 24
Max
6.965 8
1.768 7
3.010 7
4.245 7
8.948 7
1.454 6
3.424 6
6.792 6
30
28
26
24
22
20
18
16
= 32
Min
3.866 7
8.276 7
1.176 6
2.292 6
5.040 6
9.834 6
1.936 5
3.648 5
3
4
5
6
7
8
9
10
Min
2.567 7
6.462 7
1.267 6
2.645 6
4.942 6
9.678 6
1.898 5
3.761 5
10
Proposed (26)
Well-known (11)
Proposed (26)
Well-known (11)
= 24
Min
1.671 9
3.550 9
5.494 9
9.138 9
1.927 8
3.704 8
7.389 8
1.437 7
(m)
(m)
Max
4.533 10
4.654 10
1.260 9
1.923 9
3.707 9
8.918 9
1.307 8
2.792 8
= 32
Max
4.377 10
1.284 9
9.422 10
2.223 9
3.614 9
6.936 9
1.245 8
2.510 8
Min
9.137 10
2.666 9
5.362 9
8.292 9
1.856 8
3.794 8
7.470 8
1.456 7
3
4
5
6
7
8
9
10
= 24
Max
1.214 5
9.641 7
5.496 7
5.508 7
1.235 6
4.009 6
6.478 6
1.268 5
Min
0
8.277 7
2.386 6
4.660 6
9.674 6
1.858 5
3.651 5
7.285 5
= 32
Max
1.215 5
7.525 7
4.552 8
5.781 9
6.069 9
1.524 8
2.034 8
5.564 8
Min
0
0
0
1.682 8
3.579 8
7.158 8
1.484 7
2.853 7
Presented figures clearly show that the proposed algorithm (26) yields greater number of correct bits in comparison to algorithm (11).
4. Conclusion
A new circle generation DDA algorithm has been proposed.
In terms of hardware implementation and precision of circle
generation the proposed DDA algorithm for circle interpolator is more efficient as compared with existing algorithms. We
hope that the proposed algorithm will find some applications
Correct bits
Number of results
10
(m)
Proposed (26)
Well-known (11)
3
4
5
6
7
8
9
10
= 24
Max
7.780 4
9.650 5
1.165 5
2.469 6
1.731 6
2.359 6
5.371 6
1.057 5
Min
0
0
0
3.933 6
9.497 6
1.942 5
3.779 5
7.478 5
= 32
Max
7.781 4
9.632 5
1.204 5
1.501 6
1.878 7
3.598 8
2.655 8
5.028 8
Min
0
0
0
0
0
6.302 8
1.421 7
2.914 7
Conflict of Interests
The authors declare that there is no conflict of interests
regarding the publication of this paper.
Acknowledgment
The second author (Jan L. Cieslinski) is partly supported by the National Science Centre (NCN) Grant no. 2011/01/
B/ST1/05137.
References
[1] W. Wang and C. Wang, Difference method for generation of
circular arcs and ellipses, Computer-Aided Design, vol. 21, no. 1,
pp. 3337, 1989.
[2] N. Matsushiro, A new digital differential analyzer for circl generation, IEICE Transactions on Information and Systems, vol.
E81-D, no. 2, pp. 239242, 1998.
[3] I. Chami, A high precision digital differential analyzer for
circular interpolation, Tishreen University Journal, vol. 29, no.
1, 2007.
[4] H. Hama and T. Okumoto, Fast transform into polar coordinate by generalized DDA, Journal of the Institute of Television
Engineers of Japan, vol. 47, no. 1, pp. 97100, 1993.
[5] X. Y. Fan, Y. H. Guo, and S. C. Li, New digital differential analyzer interpolation algorithm, Advanced Science Letters, vol. 6,
no. 1, pp. 692695, 2012.
[6] X. L. Yan, W. L. Wang, and N. Xue, Research and simulation of
an efficient circular interpolation algorithm, Advanced Materials Research, vol. 542-543, pp. 12041208, 2012.
[7] O. Masory and Y. Koren, Reference-word circular interpolators
for CNC systems, Journal of Engineering for Industry, vol. 104,
no. 4, pp. 400405, 1982.
[8] Y. Katayama, H. Harasaki, and M. Yano, Parallel algorithm of
three dimensional digital differential analyzer, in Proceedings of
the Annual Convention ITE Japan, pp. 185186, 1993.
[9] L. V. Moroz, A method for studying characteristics of digital
sine-cosine generators, Information Extraction and Processing,
vol. 36, no. 112, pp. 8490, 2012 (Ukrainian).
[10] J. L. Cieslinski and L. V. Moroz, Fast exact digital differential
analyzer for circle generation, http://arxiv.org/abs/1304.4974.
[11] W. M. Newman and R. F. Sproull, Principles of Interactive
Computer Graphics, McGraw-Hill, 1979.
[12] F. S. Lim, Y. S. Wong, and M. Rahman, Circular interpolators
for numerical control: a comparison of the modified DDA
techniques and an LSI interpolator, Computers in Industry, vol.
18, no. 1, pp. 4152, 1992.
[13] R. F. Eschenbach and B. M. Oliver, An efficient coordinate rotation algorithm, IEEE Transactions on Computers, vol. 27, no. 12,
pp. 11781180, 1978.
[14] H. Hasegawa and Y. Okada, Apparatus and method for controlling a moving vehicle utilizing a digital differential analysis
circuit, US Patent 5379353, 1995.
[15] C. Pokorny Computer Graphics, An Object Oriented Approach
to the Art and Science, Franklin, Beedle & Associates Publishing,
1994.
[16] J. L. Cieslinski and B. Ratkiewicz, On simulations of the
classical harmonic oscillator equation by difference equations,
Advances in Difference Equations, vol. 2006, Article ID 40171,
2006.
[17] J. L. Cieslinski, On the exact discretization of the classical
harmonic oscillator equation, Journal of Difference Equations
and Applications, vol. 17, no. 11, pp. 16731694, 2011.
International Journal of
Rotating
Machinery
Engineering
Journal of
Volume 2014
The Scientific
World Journal
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
International Journal of
Distributed
Sensor Networks
Journal of
Sensors
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
Volume 2014
Journal of
Control Science
and Engineering
Advances in
Civil Engineering
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
Journal of
Robotics
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
VLSI Design
Advances in
OptoElectronics
International Journal of
Navigation and
Observation
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Chemical Engineering
Hindawi Publishing Corporation
http://www.hindawi.com
Volume 2014
Volume 2014
Antennas and
Propagation
Hindawi Publishing Corporation
http://www.hindawi.com
Aerospace
Engineering
Volume 2014
Volume 2014
Volume 2014
International Journal of
International Journal of
International Journal of
Modelling &
Simulation
in Engineering
Volume 2014
Volume 2014
Volume 2014
Advances in
Volume 2014