sorbetto.geometry.bilinear_curve module

class sorbetto.geometry.bilinear_curve.BilinearCurve(Kxy, Kx, Ky, K, name: str | None = None)[source]

Bases: Conic

This class is used to represent bilinear curves: \(K_{xy} x y + K_x x + K_y y + K = 0\). These are particular cases of conic sections. \(a x^2 + b x y + c y^2 + d x + e y + f = 0\) where \(a=0\), \(b=K_{xy}\), \(c=0\), \(d=K_x\), \(e=K_y\), and \(f=K\).

draw(fig: Figure, ax: Axes, extent, **plt_kwargs)[source]

Draws the part of the bilinear curve 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.

getX(y)[source]

Computes the value of \(x\), for any given \(y\).

Parameters:

y (_type_) – \(y\)

Returns:

the value of \(x\), for the given \(y\).

Return type:

_type_

getY(x)[source]

Computes the value of \(y\), for any given \(x\).

Parameters:

x (_type_) – \(x\)

Returns:

the value of \(y\), for the given \(x\).

Return type:

_type_