Previous Up Next

4.8  (r)endering options

4.8.1   Changing the number of pixels in a rendered image

The number of pixels in a rendered image can be set manually using the r)ender menu, option 1 (or simply type ``r1'' from the main menu). The number set is the number of pixels along the $x-$axis. The number of pixels along the $y-$axis is determined by the aspect ratio of the plot.

As of version 1.11.1, the number of pixels used in an image is, by default, automatically determined by the actual number of pixels available on the graphics device, which depends in turn on the size of the page (the page size can be set manually in the p)age menu -- see §??). For pixel devices use of the automatic pixel number determination is highly recommended (hence why it is the default) to avoid interpolation artefacts in the image. For vector (non-pixel) devices such as postscript, svg or pdf, the number of pixels is set to $1024/n$, where n is the number of panels across the page.

4.8.2   Changing the colour scheme

The colour scheme used for rendered plots can be changed either by pressing `m' or `M' in interactive mode to cycle through the available schemes or manually by using the ``change colour scheme'' option in the r)ender menu.

A demonstration of all the colour schemes can be also be invoked from this menu option. Setting the colour scheme to zero plots only the contours of the rendered quantity (assuming that plot contours is set to true). The colour schemes available are shown in Figure ??.


Figure 7: splash colour schemes

User contributed colour schemes are eagerly invited (just send me either: a table of r,g,b colour indices [if you know them] or just an image of a colour bar you wish to reproduce and I will add it).

4.8.3   Plotting contours as well as the rendered image

Contours of either the rendered pixel array or of another (separate) quantity can be plotted on top of the rendered plot by setting the ``plot contours'' option from the r)ender menu. With this option set, an extra prompt will appear after the render prompt asking the user for a quantity to be contoured. The contoured quantity can also be set via the command line options (§??). If the rendered and contoured quantities are the same, further prompts appear which enable the limits for the contour plot to be set separately to the render plot. These limits are also saved separately in the splash.limits file when written.

To plot contours instead of the rendered image, use the ``change colour scheme'' option from the r)ender menu and choose colour scheme 0 (contours only).

4.8.4   Plotting contours instead of a rendered image

To plot contours instead of the rendered image, use the ``change colour scheme'' option from the r)ender menu and choose colour scheme 0 (contours only).

4.8.5   Changing the number of contour levels

The number of contour levels used whenever contours are drawn can be set via the ``change number of contours'' option in the r)ender menu. The contour levels can also be manually specified (see §??).

4.8.6   Setting the contour levels manually

As of v1.15.0, contour levels can be set manually by creating a file called splash.contours in the current directory (or prefix.contours if the splash -p prefix is specified on the command line). This file should contain one contour level per line, optionally with a label for each contour, e.g.

1.e-2  level 1
1.e-1  level 2
0.1    my really great contour
1.0    hi mum

4.8.7   Adding numeric labels to contours

An option to write numeric labels on contours appears as part of the ``change number of contours'' option in the r)ender menu.

4.8.8   Adding arbitrary contour labels

Contours can also be labelled manually by creating a splash.contours file. See §??.

4.8.9   Turning the colour bar off/ moving the colour bar label

The colour bar can be turned on or off and the style chosen (e.g. horizontal vs vertical) and for the vertical bar, the label moved closer to the bar itself, via the ``colour bar options'' option in the r)ender menu.

To change the text in the colour bar label, see §??.

4.8.10   Changing the style of the colour bar

The colour bar style (i.e., vertical vs. horizontal, plot-hugging vs. non plot-hugging, one-sided vs. two-sided, floating vs. fixed) can be changed via the ``colour bar options'' option in the r)ender submenu. If you want a different style implemented, email me!

4.8.11   Using a horizontal colour bar

An option to use a horizontal colour bar instead of the default vertical arrangement is given in the ``colour bar options'' option in the r)ender submenu.

4.8.12   Using `plot-hugging' colour bars

See §??.

4.8.13   Using floating/inset colour bars

See §??.

4.8.14   Plotting ticks on only one side of the colour bar

See §??.

4.8.15   Changing the text in the colour bar label

See §??.

4.8.16   Using coloured particles instead of rendering to pixels

As a simpler alternative to interpolating to a pixel array, particles can simply be coloured according to the value of a particular quantity by setting the ``use particle colours not pixels'' option in the r)ender menu. With this option set, rendered plots are simply plotted by colouring the particles according to the rendered field. This is somewhat cruder but can be a good indication of where individual particles might be affecting results. Note that any colouring of the particles set in interactive mode will be overwritten by use of this option.

4.8.17   Using normalised interpolations

A normalised interpolation to pixels can be used by setting the ``normalise interpolations'' option from the r)ender menu. In general this leads to smoother rendering but also means that edges and surfaces appear more prominently (and a bit strange). The general rule-of-thumb I use is therefore to use this option whenever there are no free surfaces in the simulation. Note that in 3D this option only affects cross-section slices (as it is a bit meaningless to normalise a column-integrated or opacity-rendered plot).

4.8.18   Speeding up the rendering on 3D column integrated plots

Interpolation on 3D column integrated plots can be made faster by setting the ``use accelerated rendering'' option in the r)ender menu. The reason this is an option is that it makes a small approximation by assuming that each particle lies exactly in the centre of a pixel. In general this works very well but is not set by default because it can produce funny looking results when the particles are aligned on a regular grid (e.g. as is often the case in initial conditions). Typical speed-ups range from $×2$ up to $×4$, so it is highly recommended for interactive work.

4.8.19   Using density weighted interpolation

Density weighted interpolation (where a quantity is plotted times $ρ$) can be turned on in the r)ender menu.

4.8.20   Selecting and rendering only a subset of the particles

An example of how to render using only a selected subset of the particles was given in §??.

4.8.21   Changing the label used for 3D projection plots

The labelling scheme used to determine the colour bar label can be changed via the ``customize label on projection plots'' option in the r)ender menu. Information specific to the quantity being rendered can be incorporated via format codes as follows:

 Example format strings: 
  \(2268) %l d%z %uz       : this is the default format "\int rho [g/cm^3] dz [cm]"
   column %l               : would print "column density" for density
  surface %l               : would print "surface density"
  %l integrated through %z : would print "density integrated through z"

 Format codes: 
 %l  : label for rendered quantity 
 %z  : label for 'z' 
 %uz : units label for z (only if physical units applied)

4.8.22   Changing ``column density'' to ``surface density'' on 3D plots

See §??.

4.8.23   Changing the interpolation kernel

The kernel used for the interpolations is by default the M$_4$ cubic B-spline, which has been standard in SPH calculations since the mid-1980's. Other kernels can be selected via the ``change kernel'' option in the r)ender menu. The kernel can also be changed by setting the SPLASH_KERNEL environment variable to either the kernel name as listed in the render menu option, or something sensible resembling it. At present only a few kernels are implemented, with `cubic' , `quartic' and `quintic' referring to the M$_4$, M$_5$ and M$_6$ B-splines with support of 2h and 3h, respectively. See ??? for more details.


SPLASH: A visualisation tool for SPH data ©2004–2014Daniel Price.
http://users.monash.edu.au/~dprice/splash/
Previous Up Next