sorbetto.geometry.pencil_of_lines module
- class sorbetto.geometry.pencil_of_lines.PencilOfLines(line_1: Line, line_2: Line, name: str | None = None)[source]
Bases:
AbstractGeometricObject2DThis class is used to represent pencils of lines. \(\lambda_1 ( a_1 x + b_1 y + c_1 ) + \lambda_2 ( a_2 x + b_2 y + c_2 ) = 0\) See https://en.wikipedia.org/wiki/Pencil_(geometry)
- draw(fig: Figure, ax: Axes, extent, **plt_kwargs)[source]
Draws the part of the pencil of lines that is within some axis-aligned box in some given Pyplot axes.
- Parameters:
fig (_type_) – a Pyplot Figure object
ax (_type_) – a Pyplot Axes object
extent (_type_) – the axis-aligned box \((x_{min}, x_{max}, y_{min}, y_{max})\)
plt_kwargs – options for Pyplot’s plot command.
- getLine(lambda_1: float, lambda_2: float) Line[source]
The line corresponding to \((\lambda_1, \lambda_2)\).
- Parameters:
lambda_1 (float) – the value of \(\lambda_1\)
lambda_2 (float) – the value of \(\lambda_2\)
- Returns:
the chosen line of the pixel
- Return type: