<?php
$text = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ';
//делает массив с координатами
if ($leng<16) {
exit('Слишком короткий текст.'); }
$regexLetters = '/\w/u';
$angle = 360/$leng;
for ($i=0;$i!=$leng;$i++) {
'sym' => $letters[0][$i]);
}
//рисует круг через echo (echo строчка с самыми большимы координатамипо оси y и тд)
foreach ($xysym as $key => $row) {
$x[$key] = $row['x'];
$y[$key] = $row['y'];
$sym[$key] = $row['sym'];
}
$xlast = 0;
$echoTemp = '';
$ylast = $xysym[0]['y'];
for ($i=0;$i<$leng;$i++) {
if ($ylast == $xysym[$i]['y']) {
$xlast = ($xysym[$i]['x'])-$xlast;
for ($z=0;$z<$xlast;$z++) {
$echoTemp =$echoTemp.' ';
}
$echoTemp = $echoTemp.$xysym[$i]['sym'];
$ylast = $xysym[$i]['y'];
$xlast = $xysym[$i]['x'];
} else {
echo $echoTemp."\n";
$echoTemp = '';
$xlast = $xysym[$i]['x'];
for ($z=0;$z<$xlast;$z++) {
$echoTemp = $echoTemp.' ';
}
$echoTemp = $echoTemp.$xysym[$i]['sym'];
$ylast = $xysym[$i]['y'];
}
}
echo $echoTemp."\n";
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7Cm1iX2ludGVybmFsX2VuY29kaW5nKCd1dGYtOCcpOwoKJHRleHQgPSAn0JDQkdCS0JPQlNCV0IHQltCX0JjQmdCa0JvQnNCd0J7Qn9Cg0KHQotCj0KTQpdCm0KfQqNCp0KrQq9Cs0K3QrtCvJzsKCi8v0LTQtdC70LDQtdGCINC80LDRgdGB0LjQsiDRgSDQutC+0L7RgNC00LjQvdCw0YLQsNC80LgKJGxlbmcgPSBtYl9zdHJsZW4oJHRleHQpOwppZiAoJGxlbmc8MTYpIHsKCWV4aXQoJ9Ch0LvQuNGI0LrQvtC8INC60L7RgNC+0YLQutC40Lkg0YLQtdC60YHRgi4nKTsKfQokcmFkaXVzID0gY2VpbCgkbGVuZy80KTsKJH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