       RE: triangles in circles

• To: mathgroup at smc.vnet.net
• Subject: [mg26826] RE: [mg26813] triangles in circles
• From: "David Park" <djmp at earthlink.net>
• Date: Thu, 25 Jan 2001 01:13:09 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hi Tom,

The easiest method is to use the standard Combinatorica package. KSubsets
picks out all the different subsets of k elements from a larger set.

Needs["DiscreteMath`Combinatorica`"]

With[
{n = 5},
ptlist = Table[{Cos[i 2 \[Pi]/n], Sin[i 2 \[Pi]/n]}, {i, 1, n}]];

trianglepoints = KSubsets[ptlist, 3];

trianglelines = Line[Join[#, {First[#]}]] & /@ trianglepoints;

Show[Graphics[{
Circle[{0, 0}, 1],
{PointSize[0.02], Point /@ ptlist},
trianglelines
}], AspectRatio -> Automatic];

David Park

> From: Tom De Vries [mailto:tdevries at shop.westworld.ca]
To: mathgroup at smc.vnet.net
> Hello all,
>
> I'm teaching a high school math class and we are doing permutations and
> combinations.  One of the "standard" questions is ..."given a
> certain number
> of points located around a circle, how many triangles can be formed...."
>
> The simple line below creates a circle with 5 points arranged
> around it.
> Could someone help me with a way to generate the lists of points
> that would
> create all the triangles.   I know that for more points it would
> get kind of
> messy, but I wanted to actually draw all the triangles as I
> thought it might
> be an interesting graphic...
>
>
>
> n = 5;
>
> ptlist = Table[{Cos[i 2 \[Pi]/n], Sin[i 2 \[Pi]/n]}, {i, 1, n}];
>
> Show[Graphics[{
>       Circle[{0, 0}, 1],
>       {PointSize[0.02], Point /@ ptlist}
>       }], AspectRatio -> Automatic]
>
> Sincerely, Tom De Vries
>
>
>

```

• Prev by Date: Re: triangles in circles
• Next by Date: Re: Statistics functions in packages
• Previous by thread: Re: triangles in circles
• Next by thread: Re: triangles in circles