-1

We are given either:

  1. 4 points in Cartesian coordinates
  2. 4 straight lines in Cartesian space

We assume this 2D Cartesian space is a perspective projection of a 2D space.

I may be wrong but I believe right-angled rectangles impose a constraint such that not every set of 4 such points or lines can fit a 2D perspective mapping of a rotated rectangle.

I'd like to know how to check whether the given inputs can map to a rectangle in 3D space.

If my assumption is wrong, then explaining why is also an acceptable answer.

hippietrail
  • 15,848
  • 18
  • 99
  • 158

1 Answers1

1

All triplets of points should not be collinear.

Points should form convex quadrangle. In some cases non-convexity might be solved by point order flipping (Z-form, and order is not fixed), in some cases - cannot be solved (spinner-form)

Impossible cases for lines - when three of them intersect in the same point. They should provide four, five or six different intersection points (This issue includes case when three lines are parallel)

MBo
  • 77,366
  • 5
  • 53
  • 86
  • In this case I take it the terms "quadrangle" and "quadrilateral" are synonymous. I should've included in my question that the four points have no inherent ordering. I eventually reached the same conclusion reading many articles that I only partially understood (-: – hippietrail Aug 10 '17 at 01:58