Ну вот собственно сам код, который ну никак не хочет накладывать текст на фотографию по эллиптической траектории.
$image = imagecreate(600,600);
$white = imagecolorallocate($image, 0xFF, 0xFF, 0x00);
$fontFile = './lib/fonts/times.ttf';
$textCoords = 'phpforum.su phpforum.su phpforum.su';
$fontColor = imagecolorallocate($image, 0xFF, 0x00, 0x00);
$fontSize = 25*0.752812499999996;
$y = 0+$fontSize;
$angle = 0;
$b = 100;
$x_B = 300;
$y_B = 300;
$a = 300;
$width = imagesx($image);
$textLength = strlen($textCoords);
$box = imagettfbbox( $fontSize , $angle , $fontFile , $textCoords);
$x = 0;
for($i=0;$i<$textLength;$i++)
{
$ch = $textCoords{$i};
$y = $b*sqrt(1-($x-$x_B)*2/$a*2)+$y_B;
imagefttext($image, $fontSize, $angle, $x, $y, $fontColor, $fontFile, $ch);
$type_space = imagettfbbox($fontSize, $angle, $fontFile, $ch);
$image_width = abs($type_space[4] - $type_space[0]);
$x += $image_width;
}
ob_start();
imagejpeg($image);
$imagestring = ob_get_contents();
ob_end_clean();
$encoded = base64_encode($imagestring);
?>
<img src="data://image/jpeg;base64,<?php echo $encoded ?>" />
<?
imagedestroy($image);