PDA

View Full Version : Drawing figures based on "closed" Bezier Curves



ggibaut
10-28-2009, 09:05 AM
Hello,

I have a set of application defined solid figures based on Bezier curves. (This is similar to Corel Draw, where you draw a series of connected Bezier curves and mark the curves as closed and Corel draws the result as a solid figure) I`m drawing them as tessellated polygons, but I also need to map textures to them.

Looking for references I found that the preferred way to work with Bezier curves in OpenGL is by using evaluators. But I found two problems:

1-How can I convert a figure defined in terms of a sequence of Cubic Beziers to a Bezier Surface?

2-How can avoid the 3D deformation that happens to the texture when itīs mapped to a Bezier Surface?

What technique would be the best to draw solid figures based on closed Bezier curves (as in Corel Draw) where they could be drawn with a solid color or with a texture? As now I suppose itīs by transforming the curves to a polygon, and then mapping a texture to this polygon. A texture of just one color when I need to paint them solid or the application defined texture when I need to paint them as a texture.

Thanks in Advance

Gabriel