comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Colliding galaxies in 3-D object?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Colliding galaxies in 3-D object? [message #38110 is a reply to message #38091] Tue, 17 February 2004 22:59 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
"Richard G. French" <rfrench@wellesley.edu> wrote in message
news:BC581B0F.1C17%rfrench@wellesley.edu...
> Hi, Folks -
> For an astrophysics class I'm teaching, I'm having the students write
a
> simple simulation of colliding galaxies (in IDL). They've got the
basic code
> working in standard graphics mode, with color coding for the stars in
the
> two galaxies and front and side views of the collision as it unfolds
over
> hundreds of time steps. What I'd like to do next is to view the
collision in
> 3-D with mouse control over the viewing angle and (ideally) the zoom
as
> well. The input information is a set of arrays of 3-D coordinates for
N red
> stars and N green stars, for M time steps. Can someone point me to the
3-D
> object routine in IDL that should be able to handle this, and (better
yet)
> alert me to any gotchas I should worry about as I try to implement
this?
>
> Thanks for any suggestions!
> Dick French
> rfrench@wellesley.edu

Hi Dick,

Rick Towler and I gave similar replies to a similar question last week
(thread: "An Interactively rotating 3D animation ?"... my only
half-usable post can be found by Googling for the word AnimateXObjView).
This might be a starting point for you, and the objects to put in the
XObjView could be:

n = 100 ; Number of stars in each galaxy
t = 2 ; If you want more than single-pixel stars
xyzRed = RandomN(seed, 3, n) - 1 ; (3, n) coords
xyzGreen = RandomN(seed, 3, n) + 1 ; (3, n) coords
oRed = Obj_New('IDLgrPolygon', xyzRed, Color=[255,0,0], $
Style=0, Thick=t)
oGreen = Obj_New('IDLgrPolygon', xyzGreen, Color=[0,255,0], $
Style=0, Thick=t)

(to simply see what these looks like, just paste the above into the
command line and do:
XObjView, [oRed, oGreen]
)

Then, at each time point (my section labeled "Modify objects viewed in
XObjView window"), update the objects by:

oRed -> SetProperty, Data=newXYZRed
oGreen -> SetProperty, Data=newXYZGreen

Hope this helps!

Cheers,
--
-Dick

Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
[Message index]
 
Read Message
Read Message
Previous Topic: Website update
Next Topic: Re: Website update

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:39:29 PDT 2025

Total time taken to generate the page: 0.95388 seconds