
ing a CA and a swarm intelligence algorithm with a
stochastic diffusion search.
After each iteration of the cellular automata, there
should be detected if the symmetry exists or not.
This can be done with many methods for the process-
ing of the raster data. (Mestetskiy and Zhuravskaya,
2020) use the asymmetry measure computed using the
Fourier descriptor of an object boundary. (Wang et al.,
2015) compare locally affine invariant features based
on edges to detect symmetry.
As for the problem of symmetrization, one ap-
proach for the transition from the asymmetric patterns
to complex symmetric patterns (symmetrization) was
published in (S
´
anchez and Lopez-Ruiz, 2006) and
uses a stochastically coupling the proportion of pairs
of sites located at the equal distance from the centre
of the lattice.
3 THE PROPOSED METHOD
Let us describe the proposed methods for the symme-
try detection and symmetrization of simple objects in
CA. We will consider the central and axis symmetry.
The approach to finding local symmetry will also be
described.
3.1 Symmetry Detection
Let us have some population of live cells in a CA in
some given time of development, which is to be in-
spected for its symmetry. The candidate on the centre
of the central symmetry C is calculated as the mean
position of all live cells. For each point P, a vector
V = P − C is constructed. Then, the opposite vector
V
op
is determined as V
op
= [−V
x
, −V
y
], and the cell in
the position C +V
op
is checked whether it is live. If
not, the point C is not the centre of the central sym-
metry of this cell pair and the algorithm ends. In this
way, all live cells are checked. If an opposite sym-
metric cell is found for all of them, the population is
central symmetric with the centroid C. Cells that were
found as the opposite symmetric cells do not have to
be processed because their opposite cells will always
be one of the already processed cells.
Now, the proposed method of detection of the ax-
ial symmetry will be described. It uses the centroid
C computed in the previous step. Candidate axes,
which pass through the point C, are generated. These
axes are generated with the angle between the hori-
zontal axis and the symmetry axis from 0 to 180 de-
grees with the step 0.1 degree. For each axis and
then for each cell P, the orthogonal line to the axis,
which passes through point P, is computed. Then,
the intersection I of the line and the axis is computed.
After that, the normal vector to the axis is computed
as N = P − I. An opposite vector N
op
is determined
as N
op
= [−N
x
, −N
y
], and if the cell on the position
I + N
op
is not alive, the candidate axis is not the axis
of the symmetry, and the algorithm can jump to the
next axis. If all points meet the condition, the candi-
date axis is the axis of the symmetry.
These methods can be applied to all live cells from
a CA to detect global symmetry. The local symmetry
can also be found using a clustering algorithm, such
as K-means, as the first step. The resulting clusters
can be processed separately by symmetry detection
algorithms.
3.2 Symmetrization
The proposed symmetrization method is based on the
library of symmetrical patterns. This library contains
basic symmetrical objects, such as horizontal and ver-
tical lines, rectangles, and circles of different sizes.
The method is based on the computation of distance
between objects from the library and the current con-
figuration. This distance is computed as the difference
between the live and dead cells in the configuration
and the object from the library.
Before the symmetrization starts, the algorithm
for symmetry detection is applied to verify there is
neither a symmetry centroid nor a symmetry axis. In
each step, the size of the current population is com-
puted as the size of the bounding box of all live cells.
The distances for objects from the library, which have
a similar size with toleration 2 in each dimension, will
be computed. If the minimal size is lower than some
threshold, the current configuration of the CA will be
replaced by the symmetric pattern from the library.
The symmetrization ends when the symmetry detec-
tion algorithm finds some symmetry axis or a centroid
of the central symmetry.
The symmetrization can be done globally on the
whole population or locally on clusters.
4 EXPERIMENTS AND RESULTS
Let us present the experiments with the symmetry de-
tection and the symmetrization method. The method
was developed in the C# programming language, and
the experiments ran on the computer with the Proces-
sor AMD Ryzen 7 7730U (8 cores with simultane-
ous multithreading, 2 GHz, 4.5 GHz turbo) with inte-
grated Radeon graphics and 16 GB RAM. The exper-
iments were processed on the operating system Win-
dows 11 Home.
GRAPP 2025 - 20th International Conference on Computer Graphics Theory and Applications
318