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

Dark Star

Getting triangle points in order

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