show#

Session.show(what: str = 'image', width: int | None = None, height: int | None = None, temporal: bool = False, aa: int = 4, fps: float = 30.0, num_frames: int | None = None, ui: str | None = 'simple') renderable.Renderable#

Capture the current EnSight scene or otherwise make it available for display in a web browser.

This method generates the appropriate visuals and returns the renderable object for viewing. If the session is in a Jupyter notebook, the cell in which the show() method is issued is updated with the renderable display.

Parameters:
whatstr, optional

Type of scene display to generate. The default is "image". Options are:

  • image: Simple rendered PNG image

  • deep_pixel: EnSight deep pixel image

  • animation: MPEG4 movie

  • webgl: Interactive WebGL-based browser viewer

  • remote: Remote rendering-based interactive EnSight viewer

  • remote_scene: Remote rendering-based interactive EnSight viewer

widthint, optional

Width of the rendered entity. The default is None.

heightint, optional

Height of the rendered entity. The default is None.

temporalbool, optional

Whether to include all timesteps in WebGL views. The default is False.

aaint, optional

Number of antialiasing passes to use when rendering images. The default is 4.

fpsfloat, optional

Number of frames per second to use for animation playback. The default is 30.

num_framesint, optional

Number of frames of static timestep to record for animation playback.

Returns:
renderable.Renderable
Raises:
RuntimeError

If it is not possible to generate the content.

Examples

Render an image and display it in a browser. Rotate the scene and update the display.

>>> image = session.show('image', width=800, height=600)
>>> image.browser()
>>> session.ensight.view_transf.rotate(30, 30, 0)
>>> image.update()
>>> image.browser()