MathGroup Archive 2009

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

Search the Archive

Re: Creating a Mandala

  • To: mathgroup at
  • Subject: [mg102062] Re: Creating a Mandala
  • From: dr DanW <dmaxwarren at>
  • Date: Tue, 28 Jul 2009 02:05:03 -0400 (EDT)
  • References: <h4ju9a$45m$>

(Something happened on my first attempt at posting.  Hopefully, this
is not a repeat.)

This looked like an interesting problem, so I spent a little time on
it.  However, I would strongly advise you that if you plan to continue
to work in Mathematica, then forget all Basic!  My Italian is a little
rusty, but I got Google Translate to translate the web page you refer
to.  This will only work in Mathematica 6 or higher.

LuckyKidSeat[i_, q_] := With[{ang = (i*(1. + i)*Pi)/q},
     {Cos[ang], Sin[ang]}]

TeacherPathPlot[istart_, nlines_, nkids_, colors_] :=
   Graphics[Table[{colors[(i - istart)/nlines],
         Line[{LuckyKidSeat[i, nkids],
      LuckyKidSeat[i + 1, nkids]}]},
       {i, istart, istart + nlines}], AspectRatio -> 1]

TeacherPathMovie[nlines_, nkids_, colors_] :=
   Animate[TeacherPathPlot[k, nlines, nkids, colors],
     {k, 1, nkids - nlines}]

TeacherPathMovie[100, 2^20, ColorData["DarkRainbow"]]


  • Prev by Date: Re: Show doesn't work inside Do loop ?
  • Next by Date: Re: freeing memory used by Import[]
  • Previous by thread: Creating a Mandala
  • Next by thread: Re: Creating a Mandala