Re: How to modify Convex Hull program to give output as Cartesian Coordinates?

• To: mathgroup at smc.vnet.net
• Subject: [mg48774] Re: [mg48760] How to modify Convex Hull program to give output as Cartesian Coordinates?
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Wed, 16 Jun 2004 04:54:24 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```data2D = {{4.4, 14}, {6.7, 15.25}, {6.9, 12.8},
{2.1, 11.1}, {9.5, 14.9}, {13.2, 11.9},
{10.3, 12.3}, {6.8, 9.5}, {3.3, 7.7}, {0.6, 5.1},
{5.3, 2.4}, {8.45, 4.7}, {11.5, 9.6}, {13.8, 7.3},
{12.9, 3.1}, {11, 1.1}};

Needs["DiscreteMath`ComputationalGeometry`"];

convexhull=data2D[[#]]& /@ ConvexHull[data2D];

Show[Graphics[{AbsolutePointSize[6],
Point /@ data2D,
Line[AppendTo[convexhull, First[convexhull]]]}]];

Bob Hanlon

>
> From: gilmar.rodriguez at nwfwmd.state.fl.us (Gilmar Rodr?guez Pierluissi)
To: mathgroup at smc.vnet.net
> Date: 2004/06/15 Tue AM 02:50:06 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg48774] [mg48760] How to modify Convex Hull program to give output as
Cartesian Coordinates?
>
> Greetings Mathematica Group!:
>
> I use the following example, to formulate my question:
>
> In[1]: data2D = {{4.4, 14}, {6.7, 15.25}, {6.9, 12.8}, {2.1, 11.1},
>                 {9.5, 14.9},{13.2, 11.9}, {10.3, 12.3}, {6.8, 9.5},
>                 {3.3, 7.7}, {0.6, 5.1},{5.3, 2.4},{8.45, 4.7},
>                 {11.5, 9.6},{13.8, 7.3}, {12.9, 3.1}, {11, 1.1}};
>
> In[2]: << DiscreteMath`ComputationalGeometry`
>
> In[3]: convexhull = ConvexHull[data2D]
>
> Out[3]: {14,6,5,2,1,4,10,11,16,15}
>
> My question is:
>
> Is there any way to modify the ConvexHull program to give the
> Cartesian coordinates of the points corresponding to the values
> 14,6,5,2,1,4,10,11,16,15; instead of Out[3] above?
>
> Thank you!
>
>

```

• Prev by Date: Re: exporting the values of evaluated functions
• Next by Date: Suggestions for more compact code
• Previous by thread: Re: How to modify Convex Hull program to give output as Cartesian Coordinates?
• Next by thread: exporting the values of evaluated functions