visualization.system.surface

Surface Visualization Module

This module contains classes for visualizing optical surfaces in 2D and 3D.

Kramer Harrison, 2024

Classes

Surface2D(surface, ray_extent)

A class used to represent a 2D surface for visualization.

Surface3D(surface, extent)

A class used to represent a 3D surface for visualization.

class Surface2D(surface, ray_extent)[source]

A class used to represent a 2D surface for visualization.

Parameters:
  • surf (Surface) – The surface object containing the geometry.

  • extent (tuple) – The extent of the surface in the x and y directions.

surf

The surface object containing the geometry.

Type:

Surface

ray_extent

The extent of rays on the surface.

Type:

tuple

plot(ax)[source]

Plots the surface on the given matplotlib axis.

plot(ax, theme=None, projection='YZ')[source]

Plots the surface on the given matplotlib axis.

Parameters:
  • ax (matplotlib.axes.Axes) – The matplotlib axis on which the surface will be plotted.

  • theme (Theme, optional) – The theme to use for plotting. Defaults to None.

  • projection (str, optional) – The projection plane. Must be ‘XY’, ‘XZ’, or ‘YZ’. Defaults to ‘YZ’.

class Surface3D(surface, extent)[source]

A class used to represent a 3D surface for visualization.

Parameters:
  • surf (Surface) – The surface object containing the geometry.

  • extent (tuple) – The extent of the surface in the x and y directions.

surf

The surface object containing the geometry.

Type:

Surface

extent

The extent of the surface in the x and y directions.

Type:

tuple

plot(renderer)[source]

Plots the 3D surface using the provided VTK renderer.

get_surface(theme=None)[source]

Retrieves the surface actor based on the symmetry of the surface geometry.

If the surface geometry is symmetric, it retrieves a symmetric surface actor. Otherwise, it retrieves an asymmetric surface actor.

Returns:

The surface actor, either symmetric or asymmetric, based on

the surface geometry.

Return type:

actor

plot(renderer, theme=None, *args, **kwargs)[source]

Plots the surface on the given renderer.

Parameters:
  • renderer (vtkRenderer) – The renderer to which the surface actor will be added.

  • theme (Theme, optional) – The theme to use for plotting. Defaults to None.