I have a group of 8 3-D points which all sit on an arbitrary plane(adsbygoogle = window.adsbygoogle || []).push({});

(The points were generated by projecting the corners of a axis aligned cube, box, onto the plane)

I wish to group all the points in a rectangle with the smallest surface area - so a tight fit rectangle.

What I am doing at the moment is:

1. transforming the plane (and thus all the points) to be parallel with thex-,y-plane (Thez-axis points to the zenith). Thus each point is now described by only an (x,y) value (as they all have the same z value)

2. Fitting a rectangle now is trivial as I just find the smallest and largest (x,y) values and these make the lower left and upper right corners of my rectangle respectively

3. Transform the corners of the rectangle back to the plane.

Is therefasterway of doing this (I am programming this so I favour speed)

Thank you very much

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fitting the 'tightest' rectangle to a set of three dimensional points

**Physics Forums | Science Articles, Homework Help, Discussion**