项目作者: takkaO

项目描述 :
Bezier Clipping algorithm
高级语言: Python
项目地址: git://github.com/takkaO/Bezier_Clipping_Algorithm.git
创建时间: 2020-02-03T12:57:00Z
项目社区:https://github.com/takkaO/Bezier_Clipping_Algorithm

开源协议:MIT License

下载


Bezier Clipping Algorithm

Features

Implemented Bezier Clipping algorithm with Python.
This program finds the intersection of a straight line and a Bezier curve.

Environment

  • Python3.6
    • scipy == 1.3.1
    • numpy == 1.17.3
    • matplotlib == 3.1.1

Run sample

Execute below command.

  1. python bezier_clipping.py

You will get below images. Red point is intersection.
result1

  1. Result1:
  2. t:0.074 -> (x, y) = [ 0.09929439 -1.76824575]
  3. t:0.595 -> (x, y) = [0.88230049 0.05870114]
  4. t:0.878 -> (x, y) = [1.33648382 1.11846224]

result2

  1. Result2:
  2. t:0.067 -> (x, y) = [ 3.27081548 -3.36609438]
  3. t:0.829 -> (x, y) = [7.00386554 1.4335414 ]

Algorithm description

Reference