Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Dark Star

Getting triangle points in order

This topic is 6549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I was just wondering if somebody could tell me how I could write a porgram that can put 3 triangle points in order. For example: P2 |\ | \ | \ | \ | \ |_____\P1 P3 how could I write a program to put the points in order. The problem is I cannot get the computer recognise order, because I want the computer to end up saying that: Point 1 = P2.x,P2.y Point 2 = P1.x,P1.y Point 3 = P3.x,P3.y which is in clockwise order so that the triangle that makes up my polygon will be in order when it comes to performing a specific calculation that I need to do. Thanks in advance. Dark Star

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!