cleanup to avoid linting issues

security-update
Andrew Port 2021-09-21 02:44:39 -07:00
parent a2b62fc011
commit 413a2864f6
1 changed files with 11 additions and 5 deletions

View File

@ -1,17 +1,23 @@
"""The goal of this gist is to show how to compute many points on a path
""" An example of how to speed up point() calculations with vectorization.
The goal of this gist is to show how to compute many points on a path
quickly using NumPy arrays. I.e. there's a much faster way than using, say
[some_path.point(t) for t in many_tvals]. The example below assumes the
`Path` object is composed entirely of `CubicBezier` objects, but this can
easily be generalized to paths containing `Line` and `QuadraticBezier` objects
also.
Note: The relevant matrix transformation for quadratics can be found in the
svgpathtools.bezier module."""
svgpathtools.bezier module.
"""
from __future__ import print_function
import numpy as np
from svgpathtools import *
from svgpathtools import bezier_point, bpoints2bezier, polynomial2bezier, Path
class HigherOrderBezier:
"""Bezier curve of arbitrary degree"""
def __init__(self, bpoints):
self.bpts = bpoints