visisipy.plots#

Visualization tools for Visisipy.

Functions#

plot_eye(→ matplotlib.axes.Axes)

Plot an eye.

Module Contents#

visisipy.plots.plot_eye(ax: matplotlib.axes.Axes, geometry: visisipy.models.EyeModel | visisipy.models.EyeGeometry, lens_edge_thickness: float = 0.0, retina_cutoff_position: float | None = None, **kwargs) matplotlib.axes.Axes#

Plot an eye.

Plot an eye with geometric parameters specified by an EyeGeometry object. The eye is oriented along the horizontal axis, with the pupil center located at (0, 0). Additional translations and rotations can be applied using matplotlib patch transforms.

Parameters#

axmatplotlib.pyplot.Axes

Matplotlib axes on which the eye will be drawn.

geometryEyeGeometry

Specification of the eye’s geometrical parameters.

lens_edge_thicknessfloat

Thickness of the lens at its edge, defaults to 0. If specified, the lens will be cut off at the point where its thickness equals this value.

retina_cutoff_positionfloat

Location to which the retina should be drawn. Defaults to the lens’s posterior apex. For a value of 0, the cutoff is located at the pupil.

Returns#

matplotlib.pyplot.Axes

Modified axes with the eye plot

Raises#

ValueError

If lens_edge_thickness is less than 0 or retina_cutoff_position is located behind the retina.