Re: triangles in circles
- To: mathgroup at smc.vnet.net
- Subject: [mg26859] Re: [mg26813] triangles in circles
- From: "Carl K. Woll" <carlw at u.washington.edu>
- Date: Fri, 26 Jan 2001 01:27:12 -0500 (EST)
- References: <200101240918.EAA03630@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Tom,
To create a list of the vertices of all the triangles, you could simply use
the function KSubsets from the package DiscreteMath`Combinatorica`. For
example,
<<DiscreteMath`Combinatorica`
?KSubsets
KSubsets[l, k] gives all
subsets of set l containing
exactly k elements, ordered
lexicographically.
n = 5;
ptlist = Table[{Cos[i 2 \[Pi]/n],Sin[i 2 \[Pi]/n]}, {i, 1, n}];
KSubsets[ptlist,3];
I didin't include the list of the vertices of the 10 triangles produced by
KSubsets.
Carl Woll
Physics Dept
U of Washington
----- Original Message -----
From: "Tom De Vries" <tdevries at shop.westworld.ca>
To: mathgroup at smc.vnet.net
Subject: [mg26859] [mg26813] triangles in circles
> 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...
>
> Thanks for any help you might have....
>
>
> 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
>
>
- References:
- triangles in circles
- From: "Tom De Vries" <tdevries@shop.westworld.ca>
- triangles in circles