Hi,
You can use "histogram" which works also in 3D.
However the next step I still haven't found an efficient way to do in DX is to
calculate a weighted histogram: instead of counting the number of
elements in bins of equal sizes, one would calculate the weighted
arithmetic mean in bins (of possibly variable size).
This problem occurs very often, for example in your case:
1) if the particles have variable mass, you want the density, i.e.
to sum the masses in each bin and divide by the bin volume.
2) if you want the velocity field you want to sum the mass weighted
velocity components normalized by the mass in the bin.
3) similarly for higher moments of the velocity field.
If any expert in DX knows how to do these averages I would be grateful to
be enlighten.
Daniel
Tim Connors wrote:
I have a datafile from a numerical simulation. The file has x,y,z,
vx,vy,vz, and particle mass. I can trivially get a volume rendition based
on the particle velocities using autogrid, but since autogrid averages
the data point values into the grid, and does not add them, when I try to
volume render the particle masses to give a density field, it all comes
out the one value (because the particle masses are all the same).
Any ideas on how to add the particle values into the 3D grid, rather than
average?
(the of course, the next problem will be how to do opacity based on
particle density, and hue based on particle velocity, but I am getting
ahead of myself at this stage...)