MathGroup Archive 2003

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

Search the Archive

Re: Concentric contours about the centroid, having the same length, and interior to an initial contour.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43995] Re: Concentric contours about the centroid, having the same length, and interior to an initial contour.
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Thu, 16 Oct 2003 04:17:20 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <bmj2mv$prl$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <bmj2mv$prl$1 at smc.vnet.net>,
 gilmar.rodriguez at nwfwmd.state.fl.us (Gilmar Rodr?guez Pierluissi) 
 wrote:

> I have a basic contour defined by:
> 
> contour = {{10545, 28012}, {10232, 28166}, {10027, 28218},
> {9714, 28115}, {9354, 28166}, {9042, 28115}, {8785, 28064},
> ....
> ....
> ....
> {11632, 26253}, {11319, 26253}, {11011, 26253}, {10750, 26458},
> {10596, 26822}, {10596, 27182}, {10596, 27494}, {10545, 28012}};
> 
> A plot of this contour is given by:
> 
> plt1 = ListPlot[contour, PlotStyle -> {Hue[0], PointSize[.01]}]
> 
> The centroid of the contour is given by:
> 
> centroid = N[Plus @@ contour/Length[contour]] 
> 
> {9426.41, 12877.6}

Actually, this is not quite the centroid because your first point is 
repeated. The correct value is

  {9423.42, 12837.1}

> My question is:
> 
> How can I generate (say) five contours, so that:
> 
> (1.) Each contour (set) have the same length as the original contour
>  (in this case, each contour should contain  375 {x,y} points).
> 
> (2.) Each contour is equidistant, and concentric (with respect to 
>  the centroid) to the previous contour.
>
> (3.) The five contours are inside the original contour defined above? 

As far as I can see, it is not possible to satisfy (2) and (3) for a 
non-trivial curve. You can generate a set of contours that are 
equidistant from one another (in the sense that each point on one 
contour is a constant perpendicular distance from the corresponding 
point on the other contour) but, for a non-convex curve the centroid 
will change. As a trivial example of this, consider the following simple 
polygon:

  pts = {{2, 1}, {-2, 1}, {-2, -1}, {-1, -1}, {-1, 0},     
   {1, 0}, {1, -1}, {2, -1}, {2, 1}};

  Show[Graphics[Line[pts]], AspectRatio -> Automatic]; 

The centroid is given by (noting the duplicated first point):

  N[Plus @@ Rest[pts]/Length[Rest[pts]]]

  {0., -0.25}

Here is a contour inside, and equidistant to, the first contour:

  pts2 = {{9/5, 4/5}, {-9/5, 4/5}, {-9/5, -4/5}, {-6/5, -4/5}, 
  {-6/5, 1/5}, {6/5, 1/5}, {6/5, -4/5}, {9/5, -4/5}, {9/5, 4/5}}; 

  Show[Graphics[{Line[pts],Line[pts2]}], AspectRatio -> Automatic];

However, the centroid has moved upwards:

  N[Plus @@ Rest[pts2]/Length[Rest[pts2]]]

  {0.,-0.15}

On the other hand, generating a set of (parametric) contours concentric 
with the centroid is easy:

   c[x_] = ((1 - x) centroid + x # & ) /@ contour;

  Show[Graphics[{Line[contour], Table[{Hue[x/6], Line[c[x/6]]}, 
      {x, 5}]}], AspectRatio -> Automatic]; 

Generating a set of contours interior to one another is more difficult.

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Problem with Fourier
  • Next by Date: RE: Illumination or obfuscation?
  • Previous by thread: Re: Concentric contours about the centroid, having the same length, and interior to an initial contour.
  • Next by thread: Re: Concentric contours about the centroid, having the same length, and interior to an initial contour.