/usr/share/doc/libgraphics-libplot-perl/examples/ccurve is in libgraphics-libplot-perl 2.2.2-5build3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/perl
use Graphics::Libplot ':ALL';
# type of plotting device
$device = 'X';
if (@ARGV) {
$device = $ARGV[0];
# die "Uknown device: $ARGV[0]" unless $ARGV[0] =~ /^ps|X|fig$/;
}
$MAXORDER =12;
sub draw_c_curve
{
my($dx,$dy,$order) = @_;
if ($order >= $MAXORDER)
{pl_fcontrel ($dx, $dy); }
else
{
draw_c_curve (0.5 * ($dx - $dy), 0.5 * ($dx + $dy), $order + 1);
draw_c_curve (0.5 * ($dx + $dy), 0.5 * ($dy - $dx), $order + 1);
}
}
$handle = pl_newpl($device, stdin, stdout, stderr);
pl_selectpl ($handle);
pl_openpl ();
pl_fspace (0.0, 0.0, 1000.0, 1000.0);
pl_flinewidth (0.25);
pl_pencolorname ("red");
pl_erase ();
pl_fmove (600.0, 300.0);
draw_c_curve (0.0, 400.0, 0);
pl_closepl () ;
pl_selectpl (0);
pl_deletepl ($handle);
1; #OK
|