|
Re: Looking for CW_ArcBall example code [message #15872 is a reply to message #15796] |
Mon, 14 June 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
David Hirsch (dhirsch226@my-deja.com ) writes:
> I am new to IDL, and I'm having trouble setting the colors in a
> CW_ArcBall. Does anyone have example code that does this that I could
> examine? Thanks!
If I were going to use the ArcBall to rotate a surface,
for example, I might set the colors up like this:
; Colors for the surface.
Device, Decomposed=0
LoadCT, 5, NColors=200
Set_Shading, Values=[0,199]
; Colors for the ArcBall.
yellow = GetColor('yellow', 200)
white = GetColor('white', 201)
black = GetColor('black', 202)
red = GetColor('red', 203)
green =GetColor{'green', 204)
colors = [white, yellow, red, green, yellow, black]
Then, when I was ready to set up the ArcBall, I would call
it like this:
arcBall = CW_ArcBall(baseID, Colors=colors)
You can find the GetColor program on my web page:
http://www.dfanning.com/programs/getcolor.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|