简体   繁体   中英

Thick Bezier Curves in OpenGL

I am writing a program in java using the jogl opengl bindings. I need to create a bezier curve that varies in thickness along the curve. So far I've only managed a thin bezier curve of single points. I'm pretty sure that this isnt going to be an easy thing to do, but i I have no idea where to even begin looking for the solution. If anyone could point me in the right direction as to how to solve this, it'd be greatly appreciated!

James

Sample the curve and for each sample point compute two points, one on each side of the curve, along the normal line at the sample point and at a distance equal to the desired width at the sample point. This creates a polygon, which you draw as filled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM