Here's a mandel.pdl suitable for autoloading.  Try it like this (or substitute your favorite plotting commands):

  $locs = (ndcoords(1000,1000)/500 - 1)/3000 + pdl(0.748973,0.0570852);
  $foo = mandel($locs,2000);
  $w=gpwin(x11,size=>[9,9]);
  $w->image($locs->using(0,1),$foo->sqrt,{j=>1,title=>"Cool!");

Attachment: mandel.pdl
Description: Binary data


On Nov 17, 2013, at 4:33 PM, Derek Lamb <[email protected]> wrote:

Xavier Calbet did this about 6 years ago (but did not use a Python comparison)


Yes, if that python example uses scipy, then by not using Perl's equivalent (PDL), there should be no surprise that Perl is 70x slower!

cheers,
Derek

On Nov 17, 2013, at 1:10 PM, Demian Riccardi wrote:

Hello everyone!

While cruising the web for who knows what, I found this:


which are slides from the first class of a computational physics course at Rutgers.  There's a little language comparison and a calculation of the Mandelbrot Set using Fortran, C++, Perl (with Math::Complex), and Python (with numpy/scipy, which is the main language for the course it seems).  Perhaps it would be nice if someone sent some awesome PDL code for the Prof to replace in the introduction so at least the comparison is fair (slide 35)?  I'd do it, but I'm swamped, and still not using PDL enough for it to be the most beautiful ever (which it should be for this).  

Demian


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to