How to find Length and Breadth of a Rectangle represented by co-ordinates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • babusek
    New Member
    • May 2010
    • 2

    How to find Length and Breadth of a Rectangle represented by co-ordinates

    How to find Length and Breadth of a Rectangle represented by co-ordinates?
    example:rectang le represented by (a,b) (c,d) (e,f) (g,h)
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you can do it vector-like by computing the absolute of adjacent points
    Code:
     x = | ⎛a⎞ – ⎛c⎞ |
         | ⎝b⎠   ⎝d⎠ |
    
    // x, =, – should be in the middle

    Comment

    • babusek
      New Member
      • May 2010
      • 2

      #3
      hi Dormilich,
      can you please explain your solution a bit.
      Thanks,
      Sekhar

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        Find the length of (a,b) to (c,d)
        Find the length of (c,d) to (e,f)

        One is the length and the second is the breadth

        Comment

        • Glenton
          Recognized Expert Contributor
          • Nov 2008
          • 391

          #5
          Do you know whether the points are in order? (a,b) to (c,d) might be a diagonal?
          Do you know whether the points are, in fact, a rectangle?

          If you know that it's a rectangle, but don't know what order the points are in, you could find three lengths from (a,b) to the other three points
          {hint: length = sqrt((a-c)^2+(b-d)^2)}
          and then the shortest is the breadth, the middle is the length and the longest is the diagonal.

          Comment

          Working...