Reference   

Complex Numbers Formulas

Many formula fractals use complex numbers in their formulas. Unfortunately, most computer languages do not allow you to perfom operations with complex numbers. Instead, you have to store complex numbers using two variables and modify the formulas to suit those two variables. A programmer trying to program a fractal has to be fairly familiar with complex numbers. The table below will serve as a reference of functions on complex numbers that are most commonly used with fractals.

As you should know, complex numbers can be stored in two different ways: using rectangular and polar coordinates. In rectangular system they have the real (a) and the imaginary (b) coefficients. In the polar coordinates, they have the radius (r) and the angle (O). To translate from one system to another, use the formulas below:

Rectangular ----> Polar

r = |a2 + b2|

O = tan–1(b / a)

Polar -----> Rectangular

a = r · cos O

b = r · sin O

Some of the algebraic functions are a lot easier to perform in either one of the systems (rectangular or polar). The following table shows operations either one of the systems.

Algebraic Functions

The complex numbers used in the operations are:

z1 = a + bi = r (cos A + i sin A)

z2 = c + di = s (cos B + i sin B)

Result

Operation

Rectangular /

Polar

Real / Radius

Imaginary / Angle

z1 + z2

R

a + b c + d
z1 – z2

R

a – b c – d
z1 · z2

P

r · s A + B
z1 / z2

P

r / s A – B
z1 ^ n

P

r ^ n A · n

P

A + 2 · k · pi

(k is any integer)

e ^ z1

R

e ^ a b
|z1|

R

|a2 + b2| 0
log [r (cos A+i sin A)]

R

log r A + 2 · k · pi

(k is any integer)

 

Some of the trig functions are not included in the following table because they are practically never used in fractals.

Trigonometric Functions

Operation

Result

cos z (ezi + e–zi) / 2
sin z (ezi – e–zi) / 2i
tan z (e2zi – 1) / [i · (e2zi + 1)]
cot z [i · (e2zi + 1)] / (e2zi – 1)
cosh z (ez + e–z) / 2
sinh z (ez – e–z) / 2
tanh z (e2z – 1) / (e2z + 1)
coth z (e2z + 1) / (e2z – 1)