Skip to content

reptillicus/Bezier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This is a simple implementation of creating 
Bezier curves from a list a control points
in Python. 

from matplotlib import pyplot as plt
from Bezier import bezier_curve

nPoints = 4
points = np.random.rand(nPoints,2)*200
xpoints = [p[0] for p in points]
ypoints = [p[1] for p in points]

xvals, yvals = bezier_curve(points, nTimes=1000)
plt.plot(xvals, yvals)
plt.plot(xpoints, ypoints, "ro")
for nr in range(len(points)):
    plt.text(points[nr][0], points[nr][1], nr)


plt.show()

About

Bezier curves for the discerning Python user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages