January 18th, 2013, 04:46 AM
Help for my project please :)
I'm an erasmus student in an engineering school in Warsaw and I have a small problem with a project I have to realise. Here is the subject :
"Generate by random a set of n points in 2D Cartesian Coordinates System. Find a quadrilateral enveloping all the points wich area is the greatest. Use functions for reading, printing appropriate data. Use local variables."
The problem is not for the language part. I just don't understand how to do it.
I'm not sure I'm really clear but the help I need is about the different steps leading to the solution.
From what my teacher told me, I understood :
"Generate the points
Create lines which goes through at least one point and have the following propriety : all the points are on one side of the line.
From those lines, create quadrilaterals.
Compare area of the quadrilateral and take the greatest."
Is it correct? From my point of view, it's not really clear :/
Can you help me please? :)
January 18th, 2013, 04:47 AM
I forgot to say thank you :)
January 18th, 2013, 05:15 AM
It seems like someone else has the same question
> Is it correct? From my point of view, it's not really clear :/
I don't know - it sounds good though.
I suggest pencil and paper, draw 3 points on the paper and work through your "algorithm" to see if it produces the right answer.
You won't be able to write the code until you understand the math/geometry which lies behind it.
> I forgot to say thank you
You also forgot to post any code.