# Draw random arcs: my $xs = random(30) * $size[0]; my $ys = random(30) * $size[1]; my $dxs = random(30) * 100; my $dys = random(30) * 100; my $start_angle = random(30) * 360; my $stop_angle = random(30) * 360; $p->pdl_arcs($xs, $ys, $dxs, $dys, $start_angle, $stop_angle, colors => random(30) * 2**24); # and random bars: $xs = random(30) * $size[0]; $ys = random(30) * $size[1]; $dxs = random(30) * 100; $dys = random(30) * 100; $p->pdl_bars($xs, $ys, $xs + $dxs, $ys + $dys, colors => random(30) * 2**24); # and random chords: $xs = random(30) * $size[0]; $ys = random(30) * $size[1]; $dxs = random(30) * 100; $dys = random(30) * 100; $start_angle = random(30) * 360; $stop_angle = random(30) * 360; $p->pdl_chords($xs, $ys, $dxs, $dys, $start_angle, $stop_angle, colors => random(30) * 2**24); # and random ellipses: $xs = random(30) * $size[0]; $ys = random(30) * $size[1]; $dxs = random(30) * 100; $dys = random(30) * 100; $p->pdl_ellipses($xs, $ys, $dxs, $dys, colors => random(30) * 2**24);
To install PDL::Drawing::Prima, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDL::Drawing::Prima
CPAN shell
perl -MCPAN -e shell install PDL::Drawing::Prima
For more information on module installation, please visit the detailed CPAN module installation guide.