Jump to content
  • Advertisement
Sign in to follow this  
incertia

Bezier curves

This topic is 2272 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!