Skip to content
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

Documentation error - Bezier to Hermite conversion #406

Open
aachrisg opened this issue Jan 9, 2024 · 0 comments
Open

Documentation error - Bezier to Hermite conversion #406

aachrisg opened this issue Jan 9, 2024 · 0 comments

Comments

@aachrisg
Copy link

aachrisg commented Jan 9, 2024

The documentation on draw_spline says:
"A cubic Bezier curve is sometimes defined by a set of 4 points { (x0,y0), (xa,ya), (xb,yb), (x1,y1) } where (x0,y0) is the starting point, (x1,y1) is the ending point and (xa,ya), (xb,yb) are two control points. The starting and ending velocities (u0,v0) and (u1,v1) can be deduced easily from the control points as u0 = (xa - x0), v0 = (ya - y0), u1 = (x1 - xb) and v1 = (y1 - yb)."

This is wrong - the differences of the coordinates need to be multiplied by 3 ->

"A cubic Bezier curve is sometimes defined by a set of 4 points { (x0,y0), (xa,ya), (xb,yb), (x1,y1) } where (x0,y0) is the starting point, (x1,y1) is the ending point and (xa,ya), (xb,yb) are two control points. The starting and ending velocities (u0,v0) and (u1,v1) can be deduced easily from the control points as u0 = 3*(xa - x0), v0 = 3*(ya - y0), u1 = 3*(x1 - xb) and v1 = 3*(y1 - yb)."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant