Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming in FORTRAN - Begginer

  1. Jun 22, 2010 #1
    I've to do a program which read "N" pairs of points and print the points which are contained in a two dimensions quadrilateral domain with vertices on (2,2), (2,5), (7,5) and (5,2),

    Can anyone help me?

    Thanks for the atention and patience.
     
  2. jcsd
  3. Jun 22, 2010 #2

    minger

    User Avatar
    Science Advisor

    Can you explain a little more.
    Got it!

    I'm lost there.
     
  4. Jun 22, 2010 #3

    Mark44

    Staff: Mentor

    The program should identify which of the N input points are inside or on the boundary of the quadrilateral you described, right?

    If that's right, the y values of the points have to satisfy 2 <= y <= 5. For the x values it's a little harder. The x values have to lie between 2 and the x value on the line that joins the points (5,2) and (7, 5). Find the equation of this line and write it as x = ay + b.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook