box

marxs.visualization.mayavi.box(obj, display, viewer=None)[source] [edit on github]

Plot a rectangular box for an object.

By default, the box extends in x,y, and z direction. The display keyword “box-half” can be used to show only one half of the box, e.g. “+x” would show the full extend in y and z direction, but only the lower half in x direction (such that rays coming from the +x direction are visible up to the interaction point). Use this for elements such as mirrors or detectors where photon interaction happens on the surface, not in the substrate.

Parameters:
objmarxs.base.MarxsElement

The element that should be plotted.

displaydict of None

Dictionary with display settings.

viewermayavi.core.scene.Scene instance.

If None, the source is not added to any figure, and will be added automatically by the modules or filters. If False, no figure will be created by modules or filters applied to the source: the source can only be used for testing, or numerical algorithms, not visualization.

Returns:
outmayavi object

Return the result of a mayavi plotting method.