| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../../gallery/scales/../widgets/../../api/bezier_api.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.beziermatplotlib.bezier#A module providing some utility functions regarding Bzier path manipulation.
Bases: object
A d-dimensional Bzier segment.
A BezierSegment can be called with an argument, either a scalar or an array-like object, to evaluate the curve at that/those location(s).
Location of the N control points.
Evaluate the Bzier curve at point(s) t in [0, 1].
Points at which to evaluate the curve.
Value of the curve for each point in t.
Return the dimension and location of the curve's interior extrema.
The extrema are the points along the curve where one of its partial derivatives is zero.
Index \(i\) of the partial derivative which is zero at each interior extrema.
Of same size as dims. The \(t\) such that \(d/dx_i B(t) = 0\)
The control points of the curve.
Degree of the polynomial. One less the number of control points.
The dimension of the curve.
[Deprecated] Evaluate the curve at a single point, returning a tuple of d floats.
Notes
Deprecated since version 3.11: Use Call the BezierSegment object with an argument. instead.
The polynomial coefficients of the Bzier curve.
Warning
Follows opposite convention from numpy.polyval.
Coefficients after expanding in polynomial basis, where \(n\) is the degree of the Bzier curve and \(d\) its dimension. These are the numbers (\(C_j\)) such that the curve can be written \(\sum_{j=0}^n C_j t^j\).
Notes
The coefficients are calculated as
where \(P_i\) are the control points of the curve.
Bases: ValueError
Check if two lines are parallel.
The gradients dy/dx of the two lines.
The angular tolerance in radians up to which the lines are considered parallel.
1 if two lines are parallel in same direction.
-1 if two lines are parallel in opposite direction.
False otherwise.
Find the intersection of the Bzier curve with a closed path.
The intersection point t is approximated by two parameters t0, t1 such that t0 <= t <= t1.
Search starts from t0 and t1 and uses a simple bisecting algorithm therefore one of the end points must be inside the path while the other doesn't. The search stops when the distance of the points parametrized by t0 and t1 gets smaller than the given tolerance.
A function returning x, y coordinates of the Bzier at parameter t. It must have the signature:
bezier_point_at_t(t: float) -> tuple[float, float]
A function returning True if a given point (x, y) is inside the closed path. It must have the signature:
inside_closedpath(point: tuple[float, float]) -> bool
Start parameters for the search.
Maximal allowed distance between the final points.
The Bzier path parameters.
Find control points of the Bzier curve passing through (c1x, c1y), (mmx, mmy), and (c2x, c2y), at parametric values 0, 0.5, and 1.
Return the intersection between the line through (cx1, cy1) at angle t1 and the line through (cx2, cy2) at angle t2.
For a line passing through (cx, cy) and having an angle t, return locations of the two points located along its perpendicular line at the distance of length.
Given the quadratic Bzier control points bezier2, returns control points of quadratic Bzier lines roughly parallel to given one separated by width.
Return a function that checks whether a point is in a circle with center (cx, cy) and radius r.
The returned function has the signature:
f(xy: tuple[float, float]) -> bool
Being similar to get_parallels, returns control points of two quadratic
Bzier lines having a width roughly parallel to given one separated by
width.
Split a Bzier curve into two at the intersection with a closed path.
Control points of the Bzier segment. See BezierSegment.
A function returning True if a given point (x, y) is inside the
closed path. See also find_bezier_t_intersecting_with_closedpath.
The tolerance for the intersection. See also
find_bezier_t_intersecting_with_closedpath.
Lists of control points for the two Bzier segments.
BezierSegment
NonIntersectingPathExceptioncheck_if_parallel()find_bezier_t_intersecting_with_closedpath()find_control_points()get_cos_sin()get_intersection()get_normal_points()get_parallels()inside_circle()make_wedged_bezier2()split_bezier_intersecting_with_closedpath()split_de_casteljau()split_path_inout()
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |