I was trying to produce a little animation with Manipulate
, where a Regular Poligon with N sides is displayed behind the previous polygon with N-1 sides , each one with a RandomColor
.
I wrote this piece of code:
Manipulate[
Graphics[Reverse[
Style[RegularPolygon[#], RandomColor[]] & /@ Range[3, l, 1]]] , {l,
3, 8, 1}]
The problem is that the color keeps changing even for the Polygons on the front. How can I avoid this? Once the color for a polygon is fixed it should not change anymore.