0

The points are guaranteed to be the vertices of some orthogonally oriented rectangle.

A trivial solution to problem is to use 8 variables, Two for each point. A better solution is to use 4 values, namely x , y co-ordinates of the center of the rectangle of those 4 points, the width and the height of the rectangle. But can we go lower? or Can we prove otherwise that 4 is the minimum?

  • Depends what you are looking for. If you want to , you can include all $8$ values in a single binary string. Not a very pleasant way to describe points, but still. – lulu May 16 '22 at 15:32
  • 1
    Are they guaranteed to be the vertices of some orthogonally oriented rectangle? If so, you should mention this (if not, your approach doesn't seem to work...) – Izaak van Dongen May 16 '22 at 15:32
  • Not sure how to word this but creating a composite variable with all 8 values is not what I'm looking for.

    Yes, They should be guaranteed to be the vertices of some orthogonally oriented rectangle. Thanks for pointing it out! I'll update it.

    – lainqec May 16 '22 at 15:37
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 16 '22 at 15:46
  • "Orthogonally oriented" = "axis-oriented"? Problem is 2D? Then coordinates are $(a,b)$, $(a+l,b)$, $(a,b+w)$, $(a+l,b+w)$. You can change any one of numbers $a$, $b$, $l$, $w$ without changing remaining 3 numbers, then 4 real numbers is minimum necessary information to describe 4 points coordinates. – Ivan Kaznacheyeu May 16 '22 at 17:28

0 Answers0