The line or curve drawing algorithms come from the system and/or video card graphics libraries that IDL's drawing commands interface with. IDL does not have any built-in ANTIALIAS methods or keywords.
I believe there is some hardware which performs (either by default or it can be configured to perform) antialiasing on the line drawing commands they receive. And I believe that the OpenGL libraries that IDL Object Graphics interfaces with may be more likely to antialias (or may, in general, produce better line quality) than IDL Direct Graphics. IDL Object Graphics already incorporates antialiasing in its rendering of text objects, not yet available in IDL Direct Graphics. Finally, I should mention that the high resolution of printer devices, like IDL's 'PS' PostScript devices, generally produces very smooth line-rendering quality, when the render method of the scene in IDL is "vector", not "bitmap" (but this is only relevant for paper output).
Antialiasing is a very tricky and computationally expensive business. Pixels just on and just outside the border of the line that the basic line-drawing functions calculate are evaluated to see how their divergent colors might be blended in order to camouflage pixel borders along the path of a line. IDL DOES have a software example of how antialiasing can be accomplished. The example is in the IDL DEMO program, named 'Object World' under 'Surfaces and 3D Graphics'. I would recommend emptying the default scene with the 'Delete' button and hitting the 'Show Grid' button on the 'Options' menu, so it is set to "Off". Use the 'Add' button to add a 'Plot' object. Then observe the behavior of the 'Options->Anti-Alias' button.
The code for that example is in 'd_objworld.pro' in IDL's '/examples/demo/demosrc/' directory. I have never studied this closely, but I can see from the behavior of the display and a quick look at the source code that the program is moving the plot around (presumably 1 pixel in the direction of every neighbor), taking a snapshot of the scene after every move, then [I believe] averaging the color values of all the snapshots together. (There might be some weighted averaging of the intermediate values going on; I'm not sure.)
Hope that helps.
James Jones
|