View Full Version : concave structures
i want to be able to draw concave structures, for example and eyebrow. This is a curve around the top with a curve underneath that stops the shape being a simple semicircle. However when i plot the points (using straight line approximations to curves) i alway end up with a semi circle...ie. the bottom of the shape doesnt curve back in to the shape...it is just a straight line joining the farthest left and right points together underneath the top curve. How do I get openGL to draw it properly? I hope that description made sense!
03-03-2004, 06:29 AM
OpenGL's core primitives only support convex polygons. You need to tesselate into multiple convex polygons, preferably triangles.
There are a lot of simple algorithms to triangulate a planar polygon.
For this special case your eyebrow could be drawn with one trianglestrip, too. If you have the same numbers of control vertices on the top and bottom edge, just imagine a zig-zag shape splitting it into triangles.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.