Re: 3D Surface Problem [message #30106 is a reply to message #30105] |
Mon, 08 April 2002 12:12   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ken Mankoff (mankoff@I.HATE.SPAM.cs.colorado.edu) writes:
> I think the problem is a few things
>
> 1) Walls are appearing at the edge of the DEM. Mars has a lot of its
> surface at below sea-level (negative altitude). But even if I say
> "dem = dem - min( dem )", so everything should be positive, I still
> get the "walls"
>
> 2) The images always come out square. I am pretty sure this is just a
> keyword I am missing, but I do not know which one and which object it
> belongs with (surface? window?).
>
> 3) The vertical scaleing is always "0 to 1" in the IDLgrModel (I
> think). This looks good with maps that cover a large vertical area
> (say, Olympus Mons or Valles Marineris). But if the map is of a
> relatively flat area (somewhere in the northern low-lands), and the
> DEM covers a few hundred meters, then those few hundred meters get
> streched vertically, and it appears warped.
>
> 4) White pixels are appearing in the images.
I don't know what the actual problems might be. But
I did just now update my Texture_Surface program which
maps an image onto a surface. The updates now preserve
the aspect ratio of the input surface data (I.e., the
data "keeps its shape"). I also added a ZSCALE keyword,
which takes a value between 0.001 and 1.0 that provides
relative "scaling" of the surface in the Z direction.
In other words, if you want a flatter surface, you would
type something like this:
IDL> Texture_Surface, dem_data, Image=marsImage, ZSCALE=0.25
I notice (in both IDL 5.4 and 5.5) that the texture mapping is
not always perfect. For example, try this:
IDL> Texture_Surface
IDL> Texture_Surface, Dist(15,30)
There will be an extraneous extra row of pixels at about Y=30
on this image, compared to the first. (Some kind of wrapping
effect?) It could be that this is what is causing your "wall"
problems.
You will also need the Aspect program from my Coyote library
to run the program:
http://www.dfanning.com/programs/texture_surface.pro
http://www.dfanning.com/programs/aspect.pro
I'd be curious to see your data in my program and see
if the problems persist.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|