Programming in FORTRAN - Begginer

  • Context: Fortran 
  • Thread starter Thread starter JesusCristo
  • Start date Start date
  • Tags Tags
    Fortran Programming
Click For Summary
SUMMARY

The discussion focuses on programming in FORTRAN to determine which points lie within a specified quadrilateral defined by the vertices (2,2), (2,5), (7,5), and (5,2). Participants clarify that the program must read "N" pairs of points and check if they fall inside or on the boundary of the quadrilateral. The y-coordinates must satisfy the condition 2 <= y <= 5, while the x-coordinates require calculating the equation of the line connecting (5,2) and (7,5) to establish boundaries. This involves deriving the line equation in the form x = ay + b.

PREREQUISITES
  • Basic understanding of FORTRAN programming
  • Knowledge of coordinate geometry and quadrilaterals
  • Ability to derive linear equations from two points
  • Familiarity with conditional statements in programming
NEXT STEPS
  • Study FORTRAN syntax for reading input and printing output
  • Learn how to implement conditional logic in FORTRAN
  • Research methods for calculating line equations from two points
  • Explore geometric algorithms for point-in-polygon tests
USEFUL FOR

This discussion is beneficial for beginner programmers, particularly those learning FORTRAN, as well as students and educators in geometry and computational geometry fields.

JesusCristo
Messages
2
Reaction score
0
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.
 
Technology news on Phys.org
Can you explain a little more.
I've to do a program which read "N" pairs of points
Got it!

print the points which are contained in a two dimensions quadrilateral domain with vertices on (2,2), (2,5), (7,5) and (5,2)
I'm lost there.
 
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.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 20 ·
Replies
20
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 26 ·
Replies
26
Views
4K