[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Surface Shaded by Elevation (LONG)

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->LoadCT, 0
    thisSurface2 -> SetProperty, palette=thispalette2
    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.