Day 20: Perl Data Language internals

PDL is powerful and has many features. But as with any complex software system, bugs can happen. Let's learn about two!

Continue reading Day 20: Perl Data Language internals...

Day 19: Twinkle, Twinkle Little Star

If you're tracing rays or transforming coordinates, you could be using PDL!

A little knowledge is a dangerous thing. Having seen how to do matrix multiplication on 16 December, the Elf R&D department, headed by Rudolf and Dancer, decided to calculate the sparkle from their baubles. In optics, tracing light rays through bits of glass that act as mirrors and lenses can be done by working through a series of equations or by multiplying matrices and vectors!

Continue reading Day 19: Twinkle, Twinkle Little Star...

Day 18: How to use PDL to draw a Mandelbrot Set

How to use PDL to draw a Mandelbrot Set

Introduction

The Mandelbrot set is a popular fractal plot that makes for great visualizations and animations, besides its scientific uses.

I will not delve into it deeply, but the link above points to a computer algorithm that is written in Python on Wikipedia. However, if you want to make that algorithm actually intuitive and more identical to the mathematical equations, you want to use PDL for it.

PDL allows for n-dimensional arrays to be created out of the box and manipulated on, as you would do in more mathematical but slower tools like MATLAB or Mathematica.

In this post, I demonstrate how to go about implementing a Mandelbrot visualization, including multibrot ones.

Continue reading Day 18: How to use PDL to draw a Mandelbrot Set...

Day 17: New operations for Perl Data Language

If you want to create new PDL operations, it's easy! You can make an ad-hoc one with Inline::Pdlpp, and expand it (or just start) by using pptemplate.

Continue reading Day 17: New operations for Perl Data Language...

Day 16: These are Testing Times, Indeed!

If you're multiplying lots of matrices together, you need PDL!

There are bales of decorative paper Markov chains that have gotten tangled, so we're going to square things away by multiplying orthogonal matrices and checking the results with Tests.

Continue reading Day 16: These are Testing Times, Indeed!...