Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Opengl quads


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

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

#1 Z3R0   Members   -  Reputation: 104

Like
0Likes
Like

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.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS