<s>
The	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
is	O
a	O
method	O
for	O
generating	O
heightmaps	B-Data_Structure
for	O
computer	O
graphics	O
.	O
</s>
<s>
It	O
is	O
a	O
slightly	O
better	O
algorithm	O
than	O
the	O
three-dimensional	O
implementation	O
of	O
the	O
midpoint	B-Algorithm
displacement	I-Algorithm
algorithm	I-Algorithm
,	O
which	O
produces	O
two-dimensional	O
landscapes	B-Algorithm
.	O
</s>
<s>
It	O
is	O
also	O
known	O
as	O
the	O
random	O
midpoint	O
displacement	O
fractal	O
,	O
the	O
cloud	O
fractal	O
or	O
the	O
plasma	B-Algorithm
fractal	I-Algorithm
,	O
because	O
of	O
the	O
plasma	O
effect	O
produced	O
when	O
applied	O
.	O
</s>
<s>
The	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
starts	O
with	O
a	O
two-dimensional	O
grid	O
,	O
then	O
randomly	O
generates	O
terrain	O
height	O
from	O
four	O
seed	O
values	O
arranged	O
in	O
a	O
grid	O
of	O
points	O
so	O
that	O
the	O
entire	O
plane	O
is	O
covered	O
in	O
squares	O
.	O
</s>
<s>
The	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
begins	O
with	O
a	O
two-dimensional	O
square	O
array	O
of	O
width	O
and	O
height	O
2n	O
+	O
1	O
.	O
</s>
<s>
The	O
image	O
below	O
shows	O
the	O
steps	O
involved	O
in	O
running	O
the	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
on	O
a	O
5	O
×	O
5	O
array	O
.	O
</s>
<s>
This	O
algorithm	O
can	O
be	O
used	O
to	O
generate	O
realistic-looking	O
landscapes	B-Algorithm
,	O
and	O
different	O
implementations	O
are	O
used	O
in	O
computer	O
graphics	O
software	O
such	O
as	O
Terragen	B-Algorithm
.	O
</s>
<s>
The	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
was	O
analyzed	O
by	O
Gavin	O
S	O
.	O
P	O
.	O
Miller	O
in	O
SIGGRAPH	O
1986	O
who	O
described	O
it	O
as	O
flawed	O
because	O
the	O
algorithm	O
produces	O
noticeable	O
vertical	O
and	O
horizontal	O
"	O
creases	O
"	O
due	O
to	O
the	O
most	O
significant	O
perturbation	O
taking	O
place	O
in	O
a	O
rectangular	O
grid	O
.	O
</s>
<s>
The	O
Lewis	O
algorithm	O
also	O
allows	O
the	O
synthesis	O
of	O
non-fractal	O
heightmaps	B-Data_Structure
such	O
as	O
rolling	O
hills	O
or	O
ocean	O
waves	O
.	O
</s>
<s>
The	O
diamond-square	B-Algorithm
algorithm	I-Algorithm
and	O
its	O
refinements	O
are	O
reviewed	O
in	O
the	O
book	O
.	O
</s>
