simoncozens/beziers.py

Python bezier manipulation library

Python

71

158 commits

updated Sep 4, 2025

See the code

README

beziers.py
----------

Beziers provides a variety of classes for constructing, manipulating and
drawing Bezier curves and paths. Principally designed for font design
software, it allows you to join, split, offset, and perform many other
operations on paths.

Here is an example session::

    from beziers.point import Point
    from beziers.path import BezierPath
    from beziers.cubicbezier import CubicBezier
    b1 = CubicBezier(
      Point(412.0,500.0), Point(308.0,665.0), Point(163.0,589.0), Point(163.0,504.0)
    )
    b2 = CubicBezier(
      Point(163.0,504.0), Point(163.0,424.0), Point(364.0,321.0), Point(366.0,216.0)
    )
    b3 = CubicBezier(
      Point(366.0,216.0), Point(368.0,94.0), Point(260.0,54.0), Point(124.0,54.0)
    )
    path = BezierPath.fromSegments([b1,b2,b3])
    path.closed = False
    path.addExtremes()
    path.balance()
    path.translate(Point(-100.0,-100.0))

    import matplotlib.pyplot as plt
    fig, ax = plt.subplots()
    path.addExtremes()
    path.plot(ax)
    plt.show()

Full documentation is available at https://simoncozens.github.io/beziers.py/index.html

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

simoncozens/beziers.py

Python bezier manipulation library

Python

71

158 commits

updated Sep 4, 2025

See the code

README

beziers.py
----------

Beziers provides a variety of classes for constructing, manipulating and
drawing Bezier curves and paths. Principally designed for font design
software, it allows you to join, split, offset, and perform many other
operations on paths.

Here is an example session::

    from beziers.point import Point
    from beziers.path import BezierPath
    from beziers.cubicbezier import CubicBezier
    b1 = CubicBezier(
      Point(412.0,500.0), Point(308.0,665.0), Point(163.0,589.0), Point(163.0,504.0)
    )
    b2 = CubicBezier(
      Point(163.0,504.0), Point(163.0,424.0), Point(364.0,321.0), Point(366.0,216.0)
    )
    b3 = CubicBezier(
      Point(366.0,216.0), Point(368.0,94.0), Point(260.0,54.0), Point(124.0,54.0)
    )
    path = BezierPath.fromSegments([b1,b2,b3])
    path.closed = False
    path.addExtremes()
    path.balance()
    path.translate(Point(-100.0,-100.0))

    import matplotlib.pyplot as plt
    fig, ax = plt.subplots()
    path.addExtremes()
    path.plot(ax)
    plt.show()

Full documentation is available at https://simoncozens.github.io/beziers.py/index.html

Not written in Markdown, so it's shown here as plain text — view it formatted on GitHub.

Project health

Overall

2.8/10

Maintained

0/10

Code review

0/10
OpenSSF Scorecard

Latest release

0.6.0 · May 9, 2024

Releases this year

0

Significant stargazers

Adrien Tétar

140 followers · starred Oct 2018

Cesare Gilento

32 followers · starred Dec 2022