-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect curve #6
Comments
I tried to modify the code for a closed curve and I also have a problem. Couldn't find where it is yet though. I keep digging! |
pretty sure this isn't solvable with Bezier curves -- afaik they are an approximation, so they'll never match the data exactly. You can get closer with higher-order curves, but they get computationally very expensive. |
It is solvable. The curve doesn't have to be pixel perfect, however as you can see on the screenshot the curve doesn't have turns in the middle of points. I ended up with this code and it works perfectly fine ;) (C# code)
|
I can confirm, @wojciech-kulik's solution works fine.
|
Hi,
There is some issue with this code, it doesn't work well with all data. Please replace your points with:
"100, 200, 300, 120, 400, 350, 350, 170, 200".
You will see this:
Top of the curve should be exactly in point, not above/below. Do you know how to fix it?
The text was updated successfully, but these errors were encountered: