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

Bezier curves #23

Open
nelsonsilva opened this issue Jul 14, 2011 · 2 comments
Open

Bezier curves #23

nelsonsilva opened this issue Jul 14, 2011 · 2 comments

Comments

@nelsonsilva
Copy link

Hi,

I've added bezier support in my fork (https://github.com/nelsonsilva/webgl-2d).

I haven't submitted a pull request since I want to fix the filling of non convex polygons.
If I add each bezier as a subpath the rendering of each of these filled is not the same as filling the whole path.
If I add all to a single subpath the use of the triangle fan doesn't work properly for non convex polygons.
I have even tried to calculate the lower left of the path and use it as the first point but it still doesn't seem to work properly.
Should we add tesselation to fix this ?

@cjcliffe
Copy link
Contributor

Thanks! -- I think the ultimate plan is to attempt this technique:

http://www.mdk.org.pl/2007/10/27/curvy-blues

which we can use to push most of the work onto the GPU -- however it wouldn't hurt to have a starter implementation in the meantime if yours is at least working well for convex.

@neave
Copy link

neave commented Nov 19, 2011

Will support for .quadraticCurveTo() be added as well? Or is there a simple workaround using .bezierCurveTo() somehow?
Thanks!

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

3 participants