Marox587
Marox587

Reputation: 25

Geometric shapes

I am working on my project with assembly language I have a text file each line in the text contain 2 coordinates (x1,y1) (x2,y2) and this coordinates is a line i can draw , my task is to find the how many rectangles and how many squares and triangles these coordinates can make , So I have to find 4 intersections and this give me 1 rectangle and by checking the distance I can differentiate between square and rectangle and if i found 3 intersection so its a triangle my main problem is how to find the intersection

I read the text and saved the number in an array of struct of type line this line contain 4 variables which are x1,y1,x2,y2 by using this array of struct how can I find the intersections to find the number of each shape .

Upvotes: 0

Views: 83

Answers (0)

Related Questions