Results 1 to 2 of 2

Thread: concave structures

  1. #1
    Guest

    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!

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: concave structures

    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.

Similar Threads

  1. Drawing concave polygons
    By hexa in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-03-2007, 06:16 AM
  2. Structures
    By Gavin in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-23-2003, 03:57 AM
  3. Concave Objects
    By seamuslawless in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 03-27-2003, 06:06 PM
  4. Concave objects
    By seamuslawless in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-23-2003, 12:08 AM
  5. Concave polygon
    By pigpig in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 08-08-2000, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean