Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.21 KB

README.md

File metadata and controls

46 lines (32 loc) · 1.21 KB

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