Re: 3d graphics [message #34169 is a reply to message #2845] |
Sun, 23 February 2003 18:54  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dan Madeira (d.madeira@ucl.ac.uk) writes:
> I'm doing a undergrad group project where we have to use IDL to code a
> sterographic representation of the solar system. However we have no prior
> knowledge of this language, and so we are a little bit stuck....
>
> We have drawn four globes representing the Earth, moon, mars and the sun
> using the `orb` procedure, and then used a for loop to translate the globes
> according to a specified orbit, redrawing the view in both the right view
> and left view widgets each time. However this results in a large lag between
> each update, which ruins the steroscopic effect. Has anyone got any ideas of
> a faster technique?
This isn't that class with Professor Machiavelli, is it?
This seems just a tad too ambitious for someone with
no IDL experience. :-(
In any case, I think you are going to want to capture
your drawings as images and animate them in something like
XInterAnimate. I presume you are using object graphics,
so you can use the READ method on the window (or draw widget)
to take a snapshot of the window. Then get the actual image
data out of the image object you create. You can use the
image data as input to XInterAnimate.
> Also, we would like to have a globe, which is internally lit, representing
> the sun. However when we placed a light source inside the orb, its surface
> remained unlit though the other objects were properly lit. Is there any
> simple way of solving this?
I don't think so. Or, I should say, I didn't come up with
anything in a couple of hours of fooling around with it.
It seems like there should be a way, but the surface of
the orb object (a polygon object) seems opaque to the light
source inside. I even tried adding a texture map to the orb
and allowing alpha transparency. I can manage to see other
things inside the orb, but not the light. :-(
I thought about putting a directional spotlight just
outside the surface of the "sun" object and rotating it
so that it always points to the viewer's eye, but I'm trying
to get a life and this seemed like WAY too much work!
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|