Graphics Programs Reference
In-Depth Information
bring this vector to its correct size, it should be multiplied by the scale factor
m
K
m
=
cos
θ
i
.
i
=0
(Notice that cos(
d
i
θ
i
)=cos
θ
i
since cosine is an even function.) This is discouraging
because it suggests that
m
multiplications are needed just to calculate the scale factor
K
m
. However, the first 16 scale factors are listed in Table 1.11 and even a quick glance
shows that they converge to the number 0.60725
...
. Reference [Vachss 87] shows that
K
m
can be obtained simply by using the
m
most significant bits of this number and
ignoring the rest.
Using the identity sin
2
θ
+cos
2
θ
= 1 and the definition tan
θ
i
=2
−i
,weget
1
1+tan
2
θ
i
1
√
1+2
−
2
i
,
cos
θ
i
=
=
which is why the scale factors of Table 1.11 were so easily calculated to a high precision
by the code
N[Table[Product[(2^(-2i)+1)^(-1/2),{i,0,n}],{n,0,16}],17]//TableForm
.
y
P
*
=(
x
*
,
y
*
)
θ
3
θ
θ
2
θ
1
P
=(
x
,
y
)
θ
0
x
Figure 1.12: CORDIC Rotation.
Exercise 1.29:
Suggest another way to calculate
K
m
.
Any practical CORDIC implementation (see [Jarvis 90] for a C program) should
have the following two features.
Search WWH ::
Custom Search