Bezier
- class nrtk.impls.perturb_image.generic.water_droplet_perturber.Bezier(p1: ndarray[Any, Any], p2: ndarray[Any, Any], angle1: float, angle2: float, r: float = 0.3, num_points: int = 100)
Class that computes the Bezier curve based on the segment information.
Each curve is made of a series of segments that are initialized by the input points, angles, target radius and number of points needed for the Bezier interpolation.
Methods
Draw Bézier curve by interpolating segments based on the Bernstein basis poynomial function.
Returns curve information.
- __init__(p1: ndarray[Any, Any], p2: ndarray[Any, Any], angle1: float, angle2: float, r: float = 0.3, num_points: int = 100) None
Define segment parameters - points, angles, radius.
- __weakref__
list of weak references to the object (if defined)
- bezier() ndarray[Any, Any]
Draw Bézier curve by interpolating segments based on the Bernstein basis poynomial function.
- The Bezier curve equation is derived by combining the Bernstein basis polynomials with the control points:
B(t) = ∑(i=0 to n) B(i, n)(t) * P(i)
- get_curve() ndarray[Any, Any]
Returns curve information.