#!/usr/bin/perl -w

use Math::Trig;
use GD;
use constant lewo  => 50;
use constant prawo => 150;
use constant b     => 10;

sub lancuch { return b * cosh(($_[0] - prawo + lewo)/b) }

$rysunek = new GD::Image(200, 200);
$rysunek->colorAllocate(255, 255, 255);
$czarny = $rysunek->colorAllocate(0,0,0);

for ($x = left; $x <= prawp; $x += 0.01) {
$rysunek->setPixel($x, 200-lancuch($x), $czarny);
}

print $rysunek->gif;

