Parabola

A parabola is a specific instance of a conic section.

class conics.Parabola(vertex, p, alpha)[source]

Represents a parabola given in the standard form by \(y^2=2px\) (i.e., opening to the right) in general position obtained by rotating the canonic parbola by angle \(-\pi\leq\alpha<\pi\) and shifting the vertex by \(\vec x_c\in\mathbb{R}^2\).

Parameters:
  • vertex (numpy.ndarray) – The 2-D coordinate of the parabola vertex.

  • p (float) – The distance of the vertex to the focus.

  • alpha (float) – The orientation of the parabola in the \(xy\) plane.

contact(pts, **kwargs)[source]

Computes the contact points on the parabola from the coordinates pts.

Parameters:
Returns:

\(N\times2\) matrix of 2-D coordinates representing the contact points.

Return type:

numpy.ndarray

static from_conic(C)[source]

Constructs a parabola from its general algebraic form.

Returns:

The geometric representation of the parabola.

Return type:

conics.Parabola

refine(pts, **kwargs)[source]

Refines the parabola parameters with respect to some reference 2-D coordinates.

The refinement is performed by minimizing the distances between the orthogonal contact points on the parabola and the observed points pts.

The method implements the approach from [ARW01].

Parameters:
Returns:

The refined parabola.

Return type:

conics.Parabola

to_conic()[source]

Converts the parabola to its general algebraic form.

Returns:

The conic representation of the parabola.

Return type:

conics.Conic