Game Development Reference
In-Depth Information
a
.
(6.8)
t
=−
x
3
This gives us the equation
x
3
++=
px
q
0
,
(6.9)
where
1
3
2
p
=−
a
+
b
2
1
q
=
a
3
ab
+
c
.
(6.10)
27
3
Once a solution x to Equation (6.9) is found, we subtract
a
3
to obtain the solu-
tion t to Equation (6.7).
The discriminant D of a cubic polynomial is given by
3
2
.
(6.11)
D
=−
4
p
27
q
By setting
1
1
r
=−
q
+−
D
3
2
108
1
1
s
=−
q
−−
D
,
(6.12)
3
2
108
we can express the three complex roots of Equation (6.9) as
x rs
x ρr ρ s
x ρ r ρs
=+
=+
=+
1
2
2
2
,
(6.13)
3
where ρ is the primitive cube root of unity given by
ρ
=− +
1
2
i
3
. (Note that
2
2
ρ
=− −
1
2
i
3
.)
2
We can simplify our arithmetic significantly by making the substitutions
p
1 1
39 3
1
p
′ ==−
a
2
+
b
q
1
1
==
3
q
a
ab
+
c
.
(6.14)
2 7
6
2
Search Nedrilad ::




Custom Search