Filed under: Uncategorized, visualization | Tags: Cosmology, Delaunay, visualization, Voronoi
This post shows some experiments I have been doing with pseudo volume rendering using Delaunay tessellations.While there are lots of techniques that can be used to display large point datasets there are very few techniques for visualizing sparsely sampled points. This is a very common situation when dealing with (astronomical) real data like galaxy redshift catalogues.
This technique does not produce “correct” volume renderings but it is very fast, uses memory efficiently and looks very cool. This approach is based on the Delaunay tessellation of the point distribution. Densities at each point are estimated assuming that they are proportional to the volume of the contiguous voronoi cell of the point. The density value can be computed at any point inside the convex hull of the point distribution by linearly interpolating the density between the 4 vertices of the tetrahedron containing the sampling point.
This is a pesudo volume rendering. Instead of computing the integrals along the line of sight for each pixel one uses summatory of the interpolated values along the faces of the tetrahedra that intersect with the line of sight. This is just a complicated way of saying that one simply has to display the triangles using the density at each point to color them. While this is technically wrong one can see that for visualization purposes it actually works very well. It was the advantage of not requiring any computation from the CPU since all the drawing is done in the graphics card.
This is a very simple OpenGL application. It still needs a lot of work. In regions with high density one could use GLpoints or point quads. I disable z-ordering so it is not possible to assign opacity to the triangles. I am also working on a .obj file loader to visualize objects like 3D survey masks, fancy axis, field lines, etc.
The advantage of using triangulation becomes clear in the low-density regions. One can resolve filamentary structures with less than 30 particles!
The images are rendering from a low-res N-body simulation. The mass per particle is in the order of 10^11 solar masses.
Filed under: visualization | Tags: Cosmic Web, Galaxies, SDSS, visualization
This post describes the main steps in the making of a SDSS fly-though I have been developing since some time ago. I started with povray but moved to Blender due to its flexibility, especially with its python api.
Since its first light the SDSS has been continuously taking both images and spectra across the northern sky. The last data release (DR7) contains almost one million galaxies with spectra and many more galaxy images. From the +- million galaxies with measured redshift only a very small fraction has high quality images. This is mainly due to the intrinsic resolution of the telescope and the atmospheric conditions at the time of observation. In order to produce images with the desired quality each galaxy in the spectroscopic sample was matched with a high-res image from a template of galaxies. The matching was done by choosing the closest galaxy in color — concentration-index space. Elliptical galaxies were displayed as quad sprites with a dense bulge and a diffuse 3D halo.
Loading galaxies into Blender
Once all galaxies have been assigned an image from the template the next step is to load the galaxy’s position, size, inclination and image into Blender. The python interface provided by Blender makes this very easy.
Galaxies were binned by their respective templates. The all galaxies were loaded into a single object in Blender. So there are 300 objects each holding several thousand quads for each galaxy. This saves memory since there is no need to store all the possible properties for each galaxy.