aerocaps.geom.curves.CircularArc2D#
- class CircularArc2D(center: Point2D, radius: Length, start_point: Point2D = None, end_point: Point2D = None, start_angle: Angle = None, end_angle: Angle = None, complement: bool = False, name: str = 'CircularArc2D', construction: bool = False)[source]#
Bases:
PCurve2DTwo-dimensional circular arc class
- __init__(center: Point2D, radius: Length, start_point: Point2D = None, end_point: Point2D = None, start_angle: Angle = None, end_angle: Angle = None, complement: bool = False, name: str = 'CircularArc2D', construction: bool = False)[source]#
Creates a circular arc object.
Note
The center and radius must be specified, along with a combination of either
start_pointorstart_angleandend_pointorend_angle. The starting and ending points are only used to determine the angle based on relationship to the center. These points do not override the value specified byradius- Parameters:
center (Point2D) – Center of the arc
radius (Length) – Arc radius
start_point (Point2D) – Optional starting point for the arc. Default:
Noneend_point (Point2D) – Optional ending point for the arc. Default:
Nonestart_angle (Angle) – Optional starting angle for the arc. Default:
Noneend_angle (Angle) – Optional ending angle for the arc. Default:
Nonecomplement (bool) – Whether to output the complement arc. Default:
Falsename (str) – Name of the geometric object. May be re-assigned a unique name when added to a
GeometryContainer. Default: ‘CircularArc2D’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
Evaluates a verbose set of parametric curve data as a class based on an input parameter value or vector
Evaluates the line at one or more \(t\)-values and returns a single point object or list of point objects
plot(ax[, nt])Plots the line on a
matplotlib.pyplot.AxesAttributes
- 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:
- 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:
- 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
tis afloat, 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:
- 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:
- 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
tis afloat, the output is a single point object. Otherwise, the output is a list of point objects- Return type:
- plot(ax: Axes, nt: int = 100, **kwargs)[source]#
Plots the line on a
matplotlib.pyplot.Axes- Parameters:
ax (plt.Axes) – Axis on which to plot the arc
nt (int) – Number of points along the arc to output to the plot. Default:
100kwargs – Additional keyword arguments to pass to
matplotlib.pyplot.Axes.plot