X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 21 Dec 2006 03:16 PM by  anon
Floating underflow when plotting in Z-buffer
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
21 Dec 2006 03:16 PM
    I've recently discovered the joys of using the Z-buffer to create high-resolution plots which I can then REBIN() to keep the fonts looking nice. However, my latest attempts result in floating underflow errors and an empty plot (axes but no data points) when I display the rebinned result of TVRD() in a regular IDL window. If I just plot straight to an IDL window without using the Z-buffer, I don't have any problem (but the fonts are blocky, of course). I have tried !EXCEPT = 0 and also FPUFIX() but this doesn't help with the blank plot, even tho' the former does of course rid me of the error messages. Given that I don't have problems when plotting to an IDL window directly I didn't expect FPUFIX() to actually help, but I'm getting desperate and starting to think that there's some unfortunate interaction between the plot routines and the Z-buffer. I really don't want to have to go back to plotting to a PostScript device and then generating a hi-res PNG file from that. I'm using IDL 6.1 on Windows XP Pro. Thanks, Andy.

    Deleted User



    New Member


    Posts:
    New Member


    --
    21 Dec 2006 03:16 PM
    It is unlikely that there are bugs or weaknesses in the Z-buffer that are causing your floating point underflow, so you probably need to step through the plot commands that are executing there. Is it TVRD( ) that is triggering the floating point underflow? Is it REBIN( )? The one main significant difference I can think of between the Z-buffer and your WINDOW device is that your WINDOW device is most likely set up for True Color, while the Z-buffer is a strictly 256-color device. You might consider what implications that might have, in case any of your plot calls are working with more than grayscale coloring. Particularly, note that TVRD( ) in the Z-buffer does different things than keyword-free TVRD( ) on a True Color display ... even if the True Color display has DECOMPOSED=0. The Z-Buffer is not the only buffer available for offscreen processing, which could be fed to REBIN( ). WINDOW also offers a /PIXMAP option, which should, offscreen, have the exact same behavior to the same plot code as what you see working without error on your display. There ARE size limits to a WINDOW, /PIXMAP however, probably either 2048x2048 or 4096x4096 on most O.S.'s (or their video cards). You should test and see whether that approach causes the same error. Finally, what I should have said at the offset, the real solution to producing plots with nice-looking fonts is to learn to do your plotting in IDL Object Graphics. The text fonts in IDL Object Graphics since 3 years now are produced [in default mode, anyway] with anti-aliased FreeType fonts, which are very crisp compared to IDL Direct Graphics fonts. The quality is pretty near PostScript. James Jones
    You are not authorized to post a reply.