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

Home » Public Forums » archive » Re: plotting particle data with halos?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: plotting particle data with halos? [message #33699] Thu, 16 January 2003 20:20
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Matt Wood <wood@astro.nospam.fit.edu> writes:


> I've got particle data generated from 'smoothed particle hydrodynamics'
> code that I'd like to visualize using idl. Are there any routines that
> will plot particles with 'halos' instead of simple colored points? If
> you'd like to see an example of what we're doing, please see
> www.astro.fit.edu/wood/100k34.gif
> It's a simulation of an interacting binary star system that has an
> accretion disk. Color indicates temperature in the disk.

The easiest thing to do might be to plot to the Z buffer, capture it,
then convolve with a gaussian, or even simpler, just SMOOTH it. That
will give a more smooth look, but of course every point will have the
same "halo" size.

However, if you really need variable size smooth particles, then you
need to kick it up a notch. You could compute a 2D gaussian for each
point, add them to an IDL array one at a time, but that might get
pretty computationally expensive. Better might be to make up a
library of 2D gaussians and then add those in turn, picking the
closest one.

A trick combination of the 1st (convolution) and 2nd (addition of
gaussians) approaches would be to sort the points according to their
particle size, partition them into a few groups, make
plots+convolutions of each using the right particle size, then add
them up.

Cool sims! I work on X-ray binaries.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: plotting particle data with halos? [message #33703 is a reply to message #33699] Thu, 16 January 2003 17:43 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Matt Wood" <wood@astro.nospam.fit.edu>

> I've got particle data generated from 'smoothed particle hydrodynamics'
> code that I'd like to visualize using idl. Are there any routines that
> will plot particles with 'halos' instead of simple colored points?

What exactly do you mean by "halo"? Do you mean that literally, as if the
particle were glowing? Or do you mean some sort of trail?

If you mean glowing, there aren't any canned routines for this that I know
of but it could be done to some degree in object graphics. I say some
degree because you would use alpha blending to create the halo effect and
IDL's object graphics renderer is not well suited for this type of rendering
(multiple moving alpha textured objects). A lot will depend on how you view
things.

Another consideration will be the number of particles you wish to create.
At a minimum each particle would be 2d and require 4 vertices in which you
would be restricted to a single static view. Practically 8 or 12 verts
would be required if you were to "billboard" the texture to view from all
angles (I actually don't know how this would render in IDL but am curious to
find out). If you want to draw 10k of these things it could get ugly.


If you are still interested I can get you started.


-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: plotting particle data with halos?
Next Topic: Re: xemacs syntax highlighting problem

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

Current Time: Wed Oct 08 15:56:15 PDT 2025

Total time taken to generate the page: 0.00613 seconds