aerocaps.geom.curves.PCurve2D#

class PCurve2D(name: str, construction: bool = False)[source]#

Bases: Geometry2D

Two-dimensional abstract parametric curve class

__init__(name: str, construction: bool = False)#

Abstract geometry class

Parameters:
  • name (str) – Name of the geometric object. May be re-assigned a unique name when added to a GeometryContainer

  • construction (bool) – Whether this is a geometry used only for construction of other geometries. If True, this geometry will not be exported or plotted. Default: False

Methods

d2cdt2(t)

Evaluates the second derivative of the curve with respect to \(t\)

dcdt(t)

Evaluates the first derivative of the curve with respect to \(t\)

evaluate(t)

Evaluates the line at one or more \(t\)-values

evaluate_pcurvedata(t)

Evaluates a verbose set of parametric curve data as a class based on an input parameter value or vector

evaluate_point2d(t)

Evaluates the line at one or more \(t\)-values and returns a single point object or list of point objects

Attributes

abstractmethod d2cdt2(t: float) ndarray[source]#

Evaluates the second derivative of the curve with respect to \(t\)

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If \(t\) is a float, the output is a 1-D array containing two elements: the \(x\)- and \(y\)-components of the second derivative. Otherwise, the output is a 2-D array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

abstractmethod dcdt(t: float) ndarray[source]#

Evaluates the first derivative of the curve with respect to \(t\)

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If \(t\) is a float, the output is a 1-D array containing two elements: the \(x\)- and \(y\)-components of the first derivative. Otherwise, the output is a 2-D array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

abstractmethod evaluate(t: float) ndarray[source]#

Evaluates the line at one or more \(t\)-values

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If t is a float, the output is a 1-D array with two elements: the values of \(x\) and \(y\). Otherwise, the output is an array of size \(\text{len}(t) \times 2\)

Return type:

numpy.ndarray

abstractmethod evaluate_pcurvedata(t: float) PCurveData2D[source]#

Evaluates a verbose set of parametric curve data as a class based on an input parameter value or vector

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

Parametric curve information, including derivative and curvature data

Return type:

PCurveData2D

abstractmethod evaluate_point2d(t: float) Point2D[source]#

Evaluates the line at one or more \(t\)-values and returns a single point object or list of point objects

Parameters:

t (float or int or numpy.ndarray) – Either a single \(t\)-value, a number of evenly spaced \(t\)-values between 0 and 1, or a 1-D array of \(t\)-values

Returns:

If t is a float, the output is a single point object. Otherwise, the output is a list of point objects

Return type:

Point2D or List[Point2D]