#!/usr/bin/perl -w
use strict;
use SVG;

sub deg2rad { return $_[0] * 3.14159/180 }

my $svg=new SVG(width=>"100", height=>"100", viewBox=>"0 0 100 100");
my $star=$svg->get_path(
    x => [50,50-100*cos(deg2rad 72),100,0,50+100*cos(deg2rad 72)],
    y => [0,100*sin(deg2rad 72),50*cos(deg2rad 54)/sin(deg2rad 54),
          50*cos(deg2rad 54)/sin(deg2rad 54),100*sin(deg2rad 72)],
    -type => "polygon",
);
$svg->polygon(%$star, fill=>"yellow");

print $svg->render;


