MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / find_control_points

Function find_control_points

lib/matplotlib/bezier.py:632–639  ·  view source on GitHub ↗

Find control points of the Bézier curve passing through (*c1x*, *c1y*), (*mmx*, *mmy*), and (*c2x*, *c2y*), at parametric values 0, 0.5, and 1.

(c1x, c1y, mmx, mmy, c2x, c2y)

Source from the content-addressed store, hash-verified

630
631
632def find_control_points(c1x, c1y, mmx, mmy, c2x, c2y):
633 """
634 Find control points of the Bézier curve passing through (*c1x*, *c1y*),
635 (*mmx*, *mmy*), and (*c2x*, *c2y*), at parametric values 0, 0.5, and 1.
636 """
637 cmx = .5 * (4 * mmx - (c1x + c2x))
638 cmy = .5 * (4 * mmy - (c1y + c2y))
639 return [(c1x, c1y), (cmx, cmy), (c2x, c2y)]
640
641
642def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):

Callers 1

make_wedged_bezier2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…