#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Red face Help for my project please :)


    Hi everyone,

    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? :)
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    I forgot to say thank you :)
  4. #3
  5. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,379
    Rep Power
    1871
    How interesting....

    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo