Re: OG polygon to EPS problem [message #31935 is a reply to message #31934] |
Fri, 30 August 2002 10:11   |
mvukovic
Messages: 63 Registered: July 1998
|
Member |
|
|
"Karl Schultz" <kschultz@devnull.researchsystems.com> wrote in message news:<akm838$4lb$1@news.rsinc.com>...
> "David Fanning" <david@dfanning.com> wrote in message
> news:MPG.17d81ca4bab3db5098998a@news.frii.com...
>> Mirko Vukovic (mvukovic@taz.telusa.com) writes:
>>
>>> In the following program, if I have hidden_lines on, the post-script
>>> is shaded black. If I have hidden_lines off, I can see the grid.
>>> This is in IDL5.4.on WinNT. The behavior with hidden_lines on does
>>> not make sense to me. Anyone else?
>>>
>>> My real application is a 3D polygon, with hidden lines on. However,
>>> all I currently get is a black blob. If I use surface elevation
>>> shading, hidden_lines have no effect, and I can trick IDL somewhat by
>>> using black-white color map with the gamma correction at 10.
>>
>> I think it is a mistake to think "vector" output is going
>> to work with polygons. I'd leave that keyword off, and then
>> see if the rest of it makes sense. I can't really tell here
>> what I am suppose to be seeing. :-)
>
> I know what the problem is.
>
> The short answer is to not try to do hidden line removal in vector mode.
> Hidden line/hidden surface removal (HLHSR) is often thought of as a
> "raster-space" operation, rather than a "vector" operation. That is, in
> vector mode, vectors and shapes are drawn without considering what other
> vectors or shapes have already been drawn. In vector mode, there is no
> frame buffer or "raster space". Thus, we don't do HLHSR on a vector device.
> The IDL docs do say that vector output is unable to reproduce certain
> effects, such as shading and depth buffering operations. We sort things in
> Z to make the best picture we can, however.
>
> Here's why you see solid polygons when you turn on HLHSR. When drawing a
> wireframe polygon in hidden-line mode, IDL first draws the polygon in fill
> mode in the background color. These "invisible" faces block the parts of
> the polygon that are behind the invisible faces. Then, when we draw the
> wireframe in the specified color, the Z buffer "clips" out the part of the
> lines that are behind the invisible faces, leaving just the lines that are
> visible.
>
> The reason why the polygons were black here instead of white is that the
> temporary color override (to the background color) didn't make it out to the
> vector output, and so they came out black. They should have been drawn
> white. But even if they were white, they wouldn't do what they were
> supposed to do in vector mode (no Z buffer), so I don't think they should be
> drawn at all. I'll look into fixing this. It is better to just have the
> wireframe draw without HLHSR than have the shield polygons draw.
>
> Karl
You see, all this is really David's fault. I really liked his
fsc_surface routine, and how easily I was able to modify it to plot
polygons instead of surfaces. And polygons are important to me, as
our data is inherently non-grid like, and polygon plots showed the
real data, with no other grids overlaid as result of tri-gridding.
So, I am converted to OG for these types of applications. But how can
I get then a decent quality rasterised printer output? If the
information is available on-line or in documentation, just give me the
keywords to facilitate the search (and I'll accept a flame or two for
not figuring out where to find it).
Thanks for all the responses,
Mirko
|
|
|