a question about IDLgrSurface [message #61438] |
Thu, 17 July 2008 06:45 |
lijiayue1107
Messages: 1 Registered: July 2008
|
Junior Member |
|
|
Hello~
I'm a beginner. This is my first time to come here. I would like to
ask a question:
I draw a IDLgrSurface, 的Style为2(光滑曲面)和为1(网格面)的时 ,维数不一样,后者比前者在x和y上都少1
I draw two IDLgrSurface, the style of the first IDLgrSurface is ' 2
',the style of the second IDLgrSurface is ' 1 ', but they can't be
superposable. The dim of x is 10, the dim of y is 20 in the first
picture. but the dim of x is 9, the dim of y is 19 in the second
picture.
code:
oPalette = OBJ_NEW('idlgrPalette')
oPalette->LOADCT, 25
thisImage = Obj_New('IDLgrImage', BYTSCL(data), Palette=oPalette)
; data is a array, 20*10
z = intarr(20, 10)
oSurface_1 = OBJ_NEW('IDLgrSurface', z, $
TEXTURE_MAP=thisImage, $
STYLE=2, SHADING=1, $
COLOR=[255, 255, 255], $
XCOORD_CONV=xs, YCOORD_CONV=ys, ZCOORD_CONV=zs)
oTranslationModel->Add, oSurface_1
oSurface_2 = OBJ_NEW('IDLgrSurface', z, $
TEXTURE_MAP=thisImage, $
STYLE=1, SHADING=1, $
COLOR=[230, 230, 230], $
XCOORD_CONV=xs, YCOORD_CONV=ys, ZCOORD_CONV=zs)
oTranslationModel->Add, oSurface_2
Thanks very much!
|
|
|