--- title: "Visualizing Point Clouds" date: 2022-05-16 categories: - astrophysics - data visualisation author: Lukas Winkler cc_license: true description: "A few ways to interactively display point clouds in 3D" --- Assuming you have a dataset of particles (e.g. dark matter particles in cosmological simulation, SPH-particles, etc.) and their coordinates, there are multiple ways to browse through them as a 3D point cloud. ## Using Paraview The most interactive method is using [Paraview](https://www.paraview.org/). It can read many input formats, but for simplicity we are using CSV files with columns for X, Y and Z coordinates here. {{}} After opening the CSV with the right delimiter we get a SpreadSheetView displaying the data. {{}} To now draw points for all particles, we go back to the default RenderView and select Filters -> Alphabetical -> Table to Points. First we need to assign the columns to the dimensions before clicking on "Apply". {{}} If you don't see any points, check if you have focused the RenderView and the eye symbol in the Pipeline Browser is enabled. If the particles are not centered or very small (e.g. because of accidentally plotting the particle ID as a dimension before), one can open the "Adjust Camera" menu of the RenderView and select a Standard Viewpoint. {{}} If your dataset has an additional column, you can color the points according to it by selecting it in the "Coloring" section. The used colormap can be edited to e.g. use logarithmic values. As a next step, reducing the opacity allows us to better see the distribution of the particle density. Depending on the number of particles a very low value can be used (e.g. 0.02 here for 2 million particles). {{}} Still areas with high density are just white blobs and the level of detail depends on the zoom level as the size of the points is always the same. {{