Giter VIP home page Giter VIP logo

bezier-curve's Introduction

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

bezier-curve's People

Contributors

vaibkumr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.