Re: Creating a Mandala
- To: mathgroup at smc.vnet.net
- Subject: [mg102062] Re: Creating a Mandala
- From: dr DanW <dmaxwarren at gmail.com>
- Date: Tue, 28 Jul 2009 02:05:03 -0400 (EDT)
- References: <h4ju9a$45m$1@smc.vnet.net>
(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"]] Enjoy.