comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: strange behaviour with z-buffer
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: strange behaviour with z-buffer [message #11951 is a reply to message #11939] Mon, 08 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Damiano Zilio (damiano.zilio@jrc.it) writes:

> I produce gif files with these 2 different ways:
>
> 1)
> set_plot,'x'
> window,0,reatin=2,xsixe=700,ysize=500
> plot.....
> img=tv()
> write_gif,'filename',img
>
> 2)
> set_plot,'z'
> device,set_resolution=[700,500]
> plot
> img=tv()
> write_gif,'filename',img
>
> But the gif files obtained are different!!!
> The relative position of the colorbar, using the z-buffer are wrong!,
> there are some
> strange overplottings!!
> Can I avoid this problem?

You must configure the Z-graphics buffer to be exactly like
your window. This means you need to make the resolution
and number of colors the same. (The Z-buffer has 256 colors
by default, which can be a very nice feature when making
GIF files. In fact, is one reason why I almost always use
the Z-buffer to make GIF files.) To make the Z-buffer
exactly like your current graphics window, try this:

ncolors = !D.N_Colors - 1
Set_Plot, 'Z'
Device, Set_Resolution=[!D.X_Size, !D.Y_Size], $
Set_Colors=ncolors

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL and COM
Next Topic: Upgrade from 3.6

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 03:56:22 PDT 2025

Total time taken to generate the page: 0.32116 seconds