[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object Surface Shaded by Elevation (LONG)
- Subject: Re: Object Surface Shaded by Elevation (LONG)
- From: Struan Gray <struan.gray(at)sljus.lu.se>
- Date: 2 Nov 1998 10:56:54 GMT
- Distribution: world
- Newsgroups: comp.lang.idl-pvwave
- Organization: This Line Intentionally Left Bland
- References: <MPG.10a6cc1221b303089896f3@news.frii.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:12597
David Fanning, davidf@dfanning.com writes:
WARNING: useful but undocumented feature follows
**You can add a palette to a surface object.**
Try replacing this line in David's program:
> thisWindow->SetProperty, Palette=thisPalette
With all of the following:
thisSurface->SetProperty, Palette=thisPalette
thisSurface2 = OBJ_NEW('IDLgrSurface', data/2, x, y, Style=style, $
Shading=0, Vert_Colors=Reform(BytScl(data), numVerts))
thisPalette2=Obj_New('IDLgrPalette')
thisPalette2->LoadCT, 0
thisSurface2 -> SetProperty, palette=thispalette2
thisSurface2->GetProperty,XRange=xrange,YRange=yrange,ZRange=zrange
xs = Normalize(xrange, Position=[-0.5,0.5])
ys = Normalize(yrange, Position=[-0.5,0.5])
zs = Normalize(zrange, Position=[-0.2,0.2])
thisSurface2->SetProperty,XCoord_Conv=xs, YCoord_Conv=ys, ZCoord_Conv=zs
thisModel->Add, thisSurface2
No doubt RSI will break this in 5.2 since I use it so much.
Struan