MathGroup Archive 2001

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

Search the Archive

Re: triangles in circles

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26850] Re: triangles in circles
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 25 Jan 2001 01:13:27 -0500 (EST)
  • References: <94ma2t$3pi@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Tom,

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

lnlist =
    ReplaceList[ptlist, {___, a_, ___, b_, ___, c_, ___} :> {a, b, c, a}];

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


Length[lnlist]

        10

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Tom De Vries" <tdevries at shop.westworld.ca> wrote in message
news:94ma2t$3pi 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...
>
> 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
>
>




  • Prev by Date: Re: Rewriting of Trigonometric Functions
  • Next by Date: RE: triangles in circles
  • Previous by thread: Re: triangles in circles
  • Next by thread: RE: triangles in circles