<s>
In	O
mathematics	O
,	O
an	O
orbit	B-Algorithm
trap	I-Algorithm
is	O
a	O
method	O
of	O
colouring	O
fractal	B-Application
images	O
based	O
upon	O
how	O
close	O
an	O
iterative	B-Algorithm
function	I-Algorithm
,	O
used	O
to	O
create	O
the	O
fractal	B-Application
,	O
approaches	O
a	O
geometric	O
shape	O
,	O
called	O
a	O
"	O
trap	O
"	O
.	O
</s>
<s>
Typical	O
traps	O
are	O
points	O
,	O
lines	O
,	O
circles	O
,	O
flower	O
shapes	O
and	O
even	O
raster	B-Algorithm
images	I-Algorithm
.	O
</s>
<s>
Orbit	B-Algorithm
traps	I-Algorithm
are	O
typically	O
used	O
to	O
colour	O
two	O
dimensional	O
fractals	B-Application
representing	O
the	O
complex	O
plane	O
.	O
</s>
<s>
A	O
point-based	O
orbit	B-Algorithm
trap	I-Algorithm
colours	O
a	O
point	O
based	O
upon	O
how	O
close	O
a	O
function	O
's	O
orbit	O
comes	O
to	O
a	O
single	O
point	O
,	O
typically	O
the	O
origin	O
.	O
</s>
<s>
A	O
line-based	O
orbit	B-Algorithm
trap	I-Algorithm
colours	O
a	O
point	O
based	O
upon	O
how	O
close	O
a	O
function	O
's	O
orbit	O
comes	O
to	O
one	O
or	O
more	O
lines	O
,	O
typically	O
vertical	O
or	O
horizontal	O
(	O
x	O
=	O
a	O
or	O
y	O
=	O
a	O
lines	O
)	O
.	O
</s>
<s>
Pickover	B-Algorithm
stalks	I-Algorithm
are	O
an	O
example	O
of	O
a	O
line	O
based	O
orbit	B-Algorithm
trap	I-Algorithm
which	O
use	O
two	O
lines	O
.	O
</s>
<s>
Orbit	B-Algorithm
traps	I-Algorithm
are	O
typically	O
used	O
with	O
the	O
class	O
of	O
two-dimensional	O
fractals	B-Application
based	O
on	O
an	O
iterative	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
A	O
program	O
that	O
creates	O
such	O
a	O
fractal	B-Application
colours	O
each	O
pixel	O
,	O
which	O
represent	O
discrete	O
points	O
in	O
the	O
complex	O
plane	O
,	O
based	O
upon	O
the	O
behaviour	O
of	O
those	O
points	O
when	O
they	O
pass	O
through	O
a	O
function	O
a	O
set	O
number	O
of	O
times	O
.	O
</s>
<s>
The	O
best	O
known	O
example	O
of	O
this	O
kind	O
of	O
fractal	B-Application
is	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
,	O
which	O
is	O
based	O
upon	O
the	O
function	O
zn+1	O
=	O
zn2	O
+	O
c	O
.	O
The	O
most	O
common	O
way	O
of	O
colouring	O
Mandelbrot	O
images	O
is	O
by	O
taking	O
the	O
number	O
of	O
iterations	O
required	O
to	O
reach	O
a	O
certain	O
bailout	O
value	O
and	O
then	O
assigning	O
that	O
value	O
a	O
colour	O
.	O
</s>
<s>
A	O
program	O
that	O
colours	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
using	O
a	O
point-based	O
orbit	B-Algorithm
trap	I-Algorithm
will	O
assign	O
each	O
pixel	O
with	O
a	O
“	O
distance	O
”	O
variable	O
,	O
that	O
will	O
typically	O
be	O
very	O
high	O
when	O
first	O
assigned	O
:	O
</s>
<s>
As	O
the	O
program	O
passes	O
the	O
complex	O
value	O
through	O
the	O
iterative	B-Algorithm
function	I-Algorithm
it	O
will	O
check	O
the	O
distance	O
between	O
each	O
point	O
in	O
the	O
orbit	O
and	O
the	O
trap	O
point	O
.	O
</s>
