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

Home » Public Forums » archive » Re: Need help in IDLgrSurface and vertical exaggeration
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: Need help in IDLgrSurface and vertical exaggeration [message #47896 is a reply to message #47895] Fri, 17 March 2006 02:54 Go to previous messageGo to previous message
raval.chintan is currently offline  raval.chintan
Messages: 54
Registered: May 2005
Member
Dear Rick,

I have been troubling you a lot for some time but belive me each
interaction (or encounter) with you has always been fruitful and
broadened by knowledge of IDL thank you for that

I have not been able to take time out to build the circuit but your
solution is terrific.

Anyways coming to the point, I am not using XOBJVIEW as you might have
suspected , instead I have been bolder and used IDLitWindow class along
with IDLgrSurface to create my own view the details are as follows:

I have used normalized coordinate system for creating the *system*
VIEWPLANE=[-0.5,-0.5,1,1]
ZCLIP=[-1,1]
EYE=1.01
Projection=2
Color = [20,50,75]


self.oSurfView = OBJ_NEW('IDLgrView', COLOR=Color,$
VIEWPLANE_RECT=viewplane, ZCLIP=zClip, projection = Projection,EYE=Eye)

Next I compute out the Convertion factors for X,Y and Z respectively.
The details for DEM are as follows

;Data dimensions are
xDemSize = 800
yDemSize = 800

;Pixel resolution is
GroundResoulution =[ 25,25] ;in meters
;Minimum height in the data set is
zMin = 0 ;in meters
;Maximum height is
zMax = 3500 ; in meters.

XCnv =[-0.5 , 1.0/xDemSize]
YCnv =[-0.5 , 1.0/yDemSize]
ZCnv =[zMin / (zMax-zMin) , 1.0 / (zMax-zMin) ]

since the dataset can be *heavy* on system (although in our test case
it is only 800x800) hence we reduce the data by congriding it and then
create a mesh of the dataset which is 10 units apart

DemData = congrid( origDEMData, xDemSize/10, yDemSize/10 )

nDemData=size(DemData)

xData = INDGEN(nDemData[1])*10
yData = INDGEN(nDemData[2])*10
;create the surface object
self.oSurface= OBJ_NEW('IDLgrSurface', DemData, $
STYLE = 2, Datax=xData, Datay=yData, $
XCOORD_CONV=XCnv , YCOORD_CONV=YCnv, $
ZCOORD_CONV=ZCnv)

;create the model
self.oSurfModel = obj_new('IDLgrModel',name ='SurfaceModel')

;add surface to model
self.oSurfModel->Add, self.oSurface

;add the model to our view
self.oSurfView ->add,self.oSurfModel

;Draw the surface on window
self.oWin->draw,self.oSurfView

Hope I have not commited any mistakes here! With this code, as I
mentioned, I am not getting any realistic depth perception. I belive
you are right when you say
----
This probably has more to do with how you are viewing the data. If you
want a scene to appear realistic, you need to scale everything
accordingly. You most likely have your surface at one scale, and your
viewing system at another.
-----

But I am not sure where I am setting the viewing systems scale and how
it is differing from the surface scale I would appreciate if you can
shed some light on this.


With regards
Chintan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: File sizes and the SAVE command
Next Topic: Re: 4D interpolation

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

Current Time: Fri Oct 10 05:47:23 PDT 2025

Total time taken to generate the page: 0.71967 seconds