Re: drawing polygon diagonals
- To: mathgroup at smc.vnet.net
- Subject: [mg112368] Re: drawing polygon diagonals
- From: Peter Pein <petsie at dordos.net>
- Date: Sat, 11 Sep 2010 05:43:59 -0400 (EDT)
- References: <i6755n$873$1@smc.vnet.net>
Am Fri, 10 Sep 2010 08:49:28 +0000 (UTC)
schrieb MH <matthewhoek at gmail.com>:
> Thanks for your help, Dan & Sjoerd!
...
> It'd be nice, though, if as n increased (with the slider) the vertices
> of the dodecagon appeared one at a time in the correct place, and the
> lines between them also appeared. For example, when n is 5 (and not
> yet all the way to 12), there'd be five red circles but they would NOT
> form a regular pentagon. Instead, they'd be in the correct position
> to be vertices of a regular dodecagon.
...
> I hope this makes sense. I'll do some more looking in the DocCenter.
> Thanks! I appreciate your help and guidance.
>
> MH
>
So I guess you want sth. like:
pts=Table[Through[{Cos,Sin}[k Pi/6]],{k,0,11}];
Manipulate[
Show[Graphics[
{Red,Circle[#,.01]&/@#,
Blue,Line[Subsets[#,{2}]]}//Flatten]&[Take[pts,n]],
PlotRange->{{-1.1,1.1},{-1.1,1.1}}],
{n,3,12,1}]
Greetings,
Peter