=pod
=encoding utf-8
=head1 Math + SVG + Perl = Tattoo
=head2 META
=head3 Author
Thomas Klausner
=head3 Email
domm AT plix.at
=head3 URL
http://domm.plix.at
=head3 URL_slides
http://domm.plix.at/talks/2019_riga_tattoo
=head3 Date
2019-08-07
=head3 Location
Rīga
=head3 Event
PerlCon 2019
=for newslide
=for img tattoo_new.jpg
=head2 Math
Interesting Numbers
√2
π
φ
e
√-1
=for newslide
Powers of 2
Prime numbers
Fibonacci numbers
=for newslide
number line
=for newslide
=for img tattoo_line_01.png
=for newslide
automate!
=head2 SVG
Scalable Vector Graphics
XML
=for newslide
=for include_code final.svg
=for newslide
=for newslide
=for newslide
Inkscape
=for img inkscape.png
=head2 Perl
use SVG;
my $svg = SVG->new( width => $width, height => $height );
=for newslide
my $style = {
'stroke' => 'rgb(0,255,0)',
'stroke-width' => $stroke,
'stroke-opacity' => '1',
'fill' => 'none',
};
=for newslide
my $top = 1;
my @fib = ( 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 );
for ( my $i = 0; $i < @fib; $i++ ) {
my $this = $fib[$i];
my $next = $fib[ $i + 1 ];
next unless $next;
my $tx = getx($this);
my $nx = getx($next);
circle( 'fib', $this, $top, $tx, $nx, $style );
$top = $top ? 0 : 1;
}
=for newslide
sub circle {
my ( $type, $this, $top, $tx, $nx, $style ) = @_;
my $diameter = $nx - $tx;
my $radius = int( $diameter / 2 );
my $center = $tx + $radius;
my $id = $type . '_' . $this;
=for newslide
$svg->circle(
cx => $center,
cy => $yax,
r => $radius,
style => $style,
);
=for newslide
my $clip = $dev->clipPath( id => $id );
$clip->rect(
x => $tx,
y => $top ? $yax : $yax - $radius,
width => $diameter,
height => $radius
);
$svg->circle( ...
'clip-path' => 'url(#' . $id . ')'
);
=for newslide
Now I had the tools to play with different ideas
=for newslide
=for img tattoo_line_01.png
| .. 2n, o .. fib, x .. prime
=for newslide
=for img tattoo_line_02.png
on a C scale, 2n, fib, prime
=for newslide
=for img tattoo_line_03.png
2n, fib, prime
=for newslide
=for img tattoo_curve_03.png
=for newslide
=for img tattoo_curves_permutation_01.png
=for newslide
=for img tattoo_curves_permutation_02.png
=for newslide
=for img tattoo_curves_permutation_03.png
=for newslide
=for img tattoo_curves_permutation_04.png
=for newslide
2n, fib, prime
=for img final.png
=for newslide
=head2 Tattoo
=for img happy_needles_halb.jpg
Happy Needles, Vienna
=for newslide
=for img needles.jpg
=for newslide
=for img happy_danny.jpg
=for newslide
=for img final.png
=for newslide
=for img tattoo_fresh.jpg