Skip to content

vaibkumr/bezier-curve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bezier curve

A Bézier curve (pronounced [bezje] in French) is a parametric curve used in computer graphics and related fields. The curve is a globally changing spline appoximation method dependent upon a certain number of points called the control points. The degree of the curve is one less than the number of control points. This is an implementation in python using matplotlib. I've calculated a lot of x and y (2D) points for varying input control points and then plotted them dynamically using animate feature of matplotlib.

how to

  1. Run bezier_plot.py
  2. See the curve
  3. change control points in file: points.txt
  4. Run bezier_calculate.py (ouput points are saved in bpoints.txt)
  5. See the curve being made dynamically
  6. Either goto step 3 or exit

TODO

  • Make the control points interactive
  • Make a GUI to select bg, point, line color etc

Requirements

  • python 3+
  • matplotlib
  • numpy
  • pandas

Examples

GIF

  • 13 control points

  • 5 contrl points

PNGs

  • 3 control points

  • 13 control points

  • 5 control points

About

Bezier curve animated implementation on python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages