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

Home » Public Forums » archive » 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: Z-Buffer [message #8196 is a reply to message #6727] Mon, 10 February 1997 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
John-David Smith <jdsmith@astrosun.tn.cornell.edu> writes:

> Dear Experts of the Buffer Z;
>
> I am trying to overlay an image created in the z-buffer with axes
> produced outside the z-buffer (to avoid pixelation and make nice-looking
> output) in a postscript image. The problem is, if the entire postscript
> region isn't used (e.g. to have multiple plots on a page), then the 3-d axes
> do not overlay the z-buffer images correctly. I could not find a way to
> map the 3-d position coordinates to the 2-d postscript coordinates for
> sub-regions of the postscript page.
>
> Any suggestions?

Here is a bit of IDL code that illustrates the problem John-David
is having. You will notice that the axes don't line up, even though
the same code is used to display the surface both in the Z-buffer
and on the display.

TVLCT, [255, 0], [255, 255], [0,0], 1
data = DIST(40,40)
thisDevice = !D.NAME
SET_PLOT, 'Z'
DEVICE, Set_Resolution=[300,300]
SURFACE, data, Color=1
picture = TVRD()
SET_PLOT, thisDevice
WINDOW, XSize=300, YSize=300
TV, picture
SURFACE, data, /NoErase, /NoData, Color=2

I've sent John-David a solution to this problem via private
e-mail and have sworn him to secrecy so we can have a little
diversion on this newsgroup.

This problem illustrates one of the deepest mysteries about
IDL that I know. I don't think there are many IDL programmers
who can solve this problem. If you can, you get an automatic
invite to the IDL Expert Programmers Convention. So here is
the contest.

I have a brand new copy of the Michael Dorris' novel A Yellow
Raft in Blue Water (a must-read book if you haven't read it
yet). I'll give it to the first person who posts an IDL program
that draws a surface in the Z-buffer and labels the axes in the
proper locations on the display. Put the time you post the result
in your post, so I don't have to worry about how long the news
machines take to get it to me.

If we don't have any winners, I'll post my answer next week.
(It will probably be wrong!)

All right. On your marks, get set, go! (And no cheating!) :-)

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 'ffff'x is negative in 5.2 positive in 5.2.1
Next Topic: 3d-polar

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

Current Time: Fri Oct 10 16:30:52 PDT 2025

Total time taken to generate the page: 1.20061 seconds