Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Fit rectangle to set of points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69337] Re: Fit rectangle to set of points
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 7 Sep 2006 23:58:04 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <edom0n$hu2$1@smc.vnet.net>

Hi,

points = Table[{Random[], Random[]}, {16}];

box = Transpose[{Min[#], Max[#]} & /@ 
Transpose[points]];

Show[Graphics[
{RGBColor[0, 0, 1],
  Rectangle @@ box, {AbsolutePointSize[4], 
RGBColor[1, 1, 0],
  Point /@ points}}, PlotRange -> All, 
Background -> RGBColor[1, 0, 0]]]

or should the rectangle rotated ??

Regards

  Jens

<buttgereit at biomediclab.de> schrieb im Newsbeitrag 
news:edom0n$hu2$1 at smc.vnet.net...
| Dear Group,
|
| I have a set of 2D points given for which I 
would like to find the
| smallest rectangle circumscribing all the 
points.
|
| Doing this with a circle instead of a rectangle 
was easy --- for the
| rectangle I don't see the trick.
|
| Any hints?
|
| TIA + Best Regards,
|
| Peter
| 



  • Prev by Date: Re: GridLines on top of Raster or RasterArray?
  • Next by Date: Re: Fit rectangle to set of points
  • Previous by thread: Re: Fit rectangle to set of points
  • Next by thread: Re: Fit rectangle to set of points