find the boundary points to find convex hull

hello,guys. I am still new in programming. I am now doing an assignment about convex hull. I have to find out the boundary points in the given text file. I have the idea how to do this assignment. Can i get some help on writing this program? Because I am using the quick hull algorithm. so i need some help on writing this function in my program. Can anyone give suggestion or giving some reference for me?
Step 1: Google "quick hull algorithm". Most of the first page results contain pseudocode. One page even includes a PHP implementation.

Step 2: Start implementing and post here if you have any specific questions.

A starting hint: most algorithms have several steps, of which some are repeated and some aren't. Start by making functions that execute one step each. Once you can do each step separately, implement the control structure that determines which step is executed when.
Thanks guy. :)
Guys,I am using below function to find the rightmost and leftmost number in my program. But how about if I want continue the next step? I want to compare the length of points and degree of points. Any suggestion for me to write into my program?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
for (int j = 0; j<obj->NumTri;j++)
	{
		{

			if (((A[j+1]).x)>((A[j]).x))
			{
				A[j+1].y = rightmost;


			}
			else
			{
				A[j].y = leftmost;

			}

		}

	}
you can also do it as ..

1
2
for (int j = 0; j<obj->NumTri;j++)
        ((A[j+1]).x)>((A[j]).x) ? A[j+1].y = rightmost : A[j].y = leftmost;
Topic archived. No new replies allowed.