We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When you get samples points from an existing bezier, and fit a curve to those points, the original bezier is inaccurately reconstructed.
>>> import bezier >>> from fitCurves import fitCurve >>> import numpy as np >>> import sys >>> >>> points = np.array([[0, 0], [5,50], [50,40], [75,50]], dtype=np.float32) >>> samples_t = np.linspace(0, 1, 100, dtype=np.float32) >>> samples_pt = [bezier.q(points, t) for t in samples_t] >>> calculated_bezier = fitCurve(samples_pt, sys.float_info.max) >>> >>> print(calculated_bezier) [[array([0., 0.], dtype=float32), array([ 4.945499, 45.22236 ], dtype=float32), array([42.795097, 37.474834], dtype=float32), array([75., 50.], dtype=float32)]] >>> print(np.array(calculated_bezier) - points) [[[ 0. 0. ] [-0.05450106 -4.7776413 ] [-7.2049026 -2.5251656 ] [ 0. 0. ]]]
(I am very grateful for your port of this function to python!)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When you get samples points from an existing bezier, and fit a curve to those points, the original bezier is inaccurately reconstructed.
(I am very grateful for your port of this function to python!)
The text was updated successfully, but these errors were encountered: