We study, by means of an atomistic toy model, the interplay of
ferroelastic twin patterns and electrical polarization. Our molecular
dynamics simulations reproduce polarity in straight twin walls as
observed experimentally. We show, by making contact with continuum
theory, that the effect is governed by linear flexoelectricity. Complex
twin patterns, with very high densities of kinks and/or junctions,
produce winding structures in the dipolar field, which are reminiscent
of polarization vortices. By means of a "cold shearing" technique, we
produce patches with high vortex densities; these unexpectedly showa net
macroscopic polarization even if neither the original sample nor the
applied mechanical perturbation breaks inversion symmetry by itself.
These results may explain some puzzling experimental observations of
"parasitic" polarity in the paraelectric phase of BaTiO3 and LaAlO3.