Jump to content

  • Log In with Google      Sign In   
  • Create Account

Opengl quads

  • You cannot reply to this topic
No replies to this topic

#1 Z3R0   Members   -  Reputation: 104


Posted 06 June 2014 - 04:23 AM

Hi gyz,

I am trying to create a set of quads surrounding a line.

Basically I have a set of points(image attached), and need to create quads that are like bezel to the line(assume 100 pixel height, width depending upon distance between points.).


The problem is the set of points that create the line are in no particular pattern i.e they can make a concave polygon or a convex pattern.


The approach I have followed is take the normal at each point and then make a point 50 pixel away on the normal on both sides. There are two separate lists for storing quad points, one is for storing the inside of the line and other for the outside.


The second image shows the case when normal slope goes from >90 to <90 and this messes the up the storing of quad points in list. Any solution to this problem will be helpful smile.png

EDIT: In the screenshot the red line should always be above the line, it messes up when slope changes to < 90. Red line contains the points of quad that are +50 pixels on the "normal" line.

Attached Thumbnails

  • question.png
  • question1.png

Edited by Z3R0, 06 June 2014 - 04:30 AM.