Generating Mathematical Images?

Hey, I was wondering what's the best way to generate mathematical images?

I was really hoping of creating a few really high resolution ones and popping down to the print shop to have them printed out. But I have a couple of problems:

1) How do I go about generating a mathematical image such as "The Devil's Stair Case" or some Fractal or some 2 dimensional surface in 3D space (well a representation of)? I need some tool where I can have the picture calculated in some arbitrary large resolution, preferably with such options as sub-pixel rendering or if it makes it look better Anti-Aliasing.

2) I'm not completely sure what DPI means I can print out at, I have 2 options of high resolution printing, 2400 DPI or 5200 DPI, does anyone know what this would mean in terms of something like "2560 x 1600 on an A4 piece of paper"?