Sign in to follow this  

Bezier curves

This topic is 2056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Do I simply just draw a line list to approximate a bezier curve in DirectX? Or is there a more efficient way to do it. Additionally, it probably is more efficient just to use cubic splines instead of applying de Casteljau's algorithm on every single control point, but I'm a bit confused how to do it while keeping the curve's first derivative continuous.

Share this post


Link to post
Share on other sites
If you're looking for a simple plotting algorithm, you can evaluate the Bezier polynomial along t in the range [0;1] and set the corresponding pixels.

With shaders you could draw the convex hull (control points) of the Bezier curve as a triangle strip/fan and then for each fragment evaluate the distance to the bezier curve. If that is below a cerain treshhold (call it line thickness), then you fill the pixel.

Share this post


Link to post
Share on other sites
I suggest to look at
[url="http://research.microsoft.com/en-us/um/people/cloop/loopblinn05.pdf"]Resolution Independant Curve Rendering using Programmable Graphics Hardware.[/url]
The naive algorithm is really easy, albeit rendering quality suffers quite a bit.

Also look at
[url="http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf"]Improved Alpha-Tested Magni?cation for Vector Textures and Special Effect[/url]

Share this post


Link to post
Share on other sites

This topic is 2056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this