$p0_max = $width;
$p1_max = $height;
$p0 = int($width / 2);
$p1 = int($height / 2);
