Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: triangles in circles

  • To: mathgroup at
  • Subject: [mg26831] Re: triangles in circles
  • From: Brian Higgins <bghiggins at>
  • Date: Thu, 25 Jan 2001 01:13:12 -0500 (EST)
  • References: <94ma2t$>
  • Sender: owner-wri-mathgroup at

Tom, Here is a way (if I understand correctly what you want to do):

Load this package so we can use the KSubsets function:


n = 5;

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

Define a simple color function to make the graphic look pretty

clr := RGBColor[Random[], Random[], Random[]]

Construct a list of line primitives that define our triangles

TrianglePrimitives =
    Map[{clr, Line[{#[[1]], #[[2]], #[[3]], #[[1]]}]} &, KSubsets[ptlist, 3]];

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



In article <94ma2t$3pi at>,
  "Tom De Vries" <tdevries at> wrote:
> 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
> 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

Sent via

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