Coder Social home page Coder Social logo

romb-technologies / bezier Goto Github PK

View Code? Open in Web Editor NEW
90.0 90.0 17.0 935 KB

Fast and lightweight class for Bezier curves of any order in C++

Home Page: https://romb-technologies.github.io/Bezier/

License: Apache License 2.0

C++ 96.39% QMake 2.04% CMake 1.57%
bezier cpp eigen3

bezier's People

Contributors

dmiklic avatar fico95 avatar ianpetek avatar stribor14 avatar tiborbs1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bezier's Issues

Update CMakeLists CXX flags

Currently flag for c++11 is passed in add_compile_options which is known to fail sometimes. It should be swapped with:

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Polyline optimization

at each step, check if the subcurve can be simplified by checking how much the last term of Bernstein polynomial influences it

"max_iter reached" case

In some functions, e.g., projectPoint(), it was never decided what should happen if the number of maximum iterations is reached!

Fix derivation

When calculating derivative curve, we multiply with number of control points instead of curve order

Newton-rhapson reaches max_iter

In a fringe case where first and second control points are nearly identical (or analogously last and second to last control point), Newton-Raphson method is shot far far away in the first step

A possible solution might be to implement Halley's method. This approach might have a slight performance hit (in a case where numerical methods are often called, e.g., hundred times in a second), and also, same will probably happen if first three (or last three) control points are in the same position.

Fix curvature

in pow, there is a int division instead of floating point

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.