romb-technologies / bezier Goto Github PK
View Code? Open in Web Editor NEWFast and lightweight class for Bezier curves of any order in C++
Home Page: https://romb-technologies.github.io/Bezier/
License: Apache License 2.0
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
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)
Raising the curve order to 7 causes a bug in the example app.
Add the method to get a list of self-intersecting points
In some cases bounding box is drawn wrong
To have correct semantics.
parameter epsilon
defines the precision of resulting length (i.e., length(t, t_out) - s < epsilon
), and not the precision of resulting parameter t_out
at each step, check if the subcurve can be simplified by checking how much the last term of Bernstein polynomial influences it
In some functions, e.g., projectPoint()
, it was never decided what should happen if the number of maximum iterations is reached!
When calculating derivative curve, we multiply with number of control points instead of curve order
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.
in pow, there is a int division instead of floating point
For solving non-linear problems (like intersections)
example: 2nd derivative of a line
uint
is used a lot throughout the library, but it turns out this datatype is not a standard C or C++ datatype, and its visibility is the result of a gcc bug. Should be replaced by unsigned
or some of the standard datatypes from cstdint.
I am using Ubuntu 22.10, Celeron N5095 processor.
There are a lot of errors during build:
https://pastebin.com/QPWL1U7w
I still can't figure out the reason. What do you think could be the problem?
In some cases when 'iterateByLength' is called, Halley's method is stuck in an infinite loop without converging.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.