Interactive display#

The Calzone interactive display enables users to navigate through the Monte Carlo geometry by controlling a drone-like camera. Furthermore, Monte Carlo tracks can be superimposed for a visual inspection.

Important

The interactive display has a limited numeric accuracy of 32 bits. While this approach provides a convenient overview of the geometry, for a robust detection of overlapping volumes, the Geometry.check method should be used instead.

Note

The interactive display is a standalone instance running in parallel with Python’s main thread. However, there can only be one display instance per process. This means that launching a new display will overwrite any existing one (in the same process).

_images/display-example.png

Fig. 6 Example of geometry and tracks, as visualised with the Calzone interactive display. The Volumes and Tracks menus are visible on the upper left corner. The Drone camera statistics are indicated on the upper right panel. Sunlight Lighting is used with atmospheric scattering enabled. The corresponding Location settings are indicated on the lower right panel. The geometry is rendered in Plain Display mode.#

Volumes menu#

The Volumes menu displays a list of geometry volumes, beginning with the root volume. This list can be expanded (by left-clicking the mouse) to reveal any daughter volumes. Holding down the Shift key while left-clicking a volume name will cause the Drone to reposition to the corresponding volume.

Table 26 below provides a summary of the possible interactions with the Volumes menu.

Table 26 Volumes menu interactions.#

Action

Result

LeftClick

Toggle the display of all daughter volumes.

LeftClick+Control

Toggle the display of all daughter volumes and their respective descendants.

LeftClick+Shift

Reposition the Drone to the targeted volume.

Tracks menu#

The Tracks menu displays a list of Monte Carlo tracks (as returned by the simulation run method), commencing with the primary track. The interactions are analoguous to those available on the Volumes menu. For example, left-clicking on a track name reveals any daughter particles. The potential interactions are summarised in Table 27 below.

Note

In order to display Monte Carlo tracks, it is necessary to first record them by setting the simulation tracking attribute to True (prior to running any simulation).

Table 27 Tracks menu interactions.#

Action

Result

LeftClick

Toggle the display of all daughter tracks.

LeftClick+Control

Toggle the display of all daughter tracks and their respective descendants.

LeftClick+Shift

Reposition the Drone to the targeted track.

The Drone#

The Drone is the entity responsible for controlling the display camera. It can be moved around using the WASD keys (assuming a QWERTY layout), and rotated by holding down the right mouse button. The available actions are summarised in Table 28 below. Furthermore, the Drone statistics (position, speed, etc.) are indicated at the top right of the display window.

Table 28 Drone interactions.#

Action

Result

RightClick+MouseMotion

Rotate the Drone.

A

Move the Drone to the left.

C

Move the Drone downwards.

D

Move the Drone to the right.

E

Increase the Drone speed.

Q

Decrease the Drone speed.

S

Move the Drone backwards.

SpaceBar

Move the Drone upwards.

W

Move the Drone forwards.

Lighting modes#

By default, the drone camera uses a bright overhead light to illuminate the scene. As an alternative option, sunlight illumination, with or without atmospheric scattering, can be utilised. Pressing the p key enables the user to cycle through the lighting modes.

Activation of the sunlight lighting function will open a Location panel in the bottom right corner of the display window. The lighting parameters (latitude, time, etc.) are reported on this panel. To edit these settings, simply click on the corresponding value. For an overview of the available interactions, refer to Table 29 below.

Table 29 Lighting interactions.#

Action

Result

LeftClick

Enter (if on a location setting value) or Exit (otherwise) the edit mode.

P

Toggle the lighting mode.

Return

Exit the edit mode (if in edit mode).

Display modes#

By default, plain solids are rendered as opaque. While this is a realistic rendering, it may not be convenient in some circumstances. Therefore, alternatively, solids can also be rendered as transparent (using Blending or Premultiplication). Additionally, the solid-mesh wires can be displayed for gas volumes only (which are invisible otherwise), or for all volumes. These display options can be selected using the PageDown, PageUp and Shift keys, as detailed in Table 30 below.

Table 30 Display interactions.#

Action

Result

PageDown

Switch to the previous display mode.

PageDown+ Shift

Switch to the previous wireframe mode.

PageUp

Switch to the next display mode.

PageUp+ Shift

Switch to the next wireframe mode.

ArrowDown

Decrease the transparency (in Blend or Premultiplied mode).

ArrowDown

Increase the transparency (in Blend or Premultiplied mode).