(* shrinking Rectangles, not rotated, with changing colour *) c = {Black, Red, Blue, Green, Magenta, Cyan, Yellow}; g = Table({{t/2, t/2}, {6-t/2, 6-t/2}}, {t, 0, 5}); h = ReplaceAll(g, {{x1_, y1_}, {x2_, y2_}} -> {{x1, y1}, {x2, y1}, {x2, y2}, {x1, y2}, {x1, y1}}); Graphics({Riffle(c, Table(Line(Flatten(Part(h, k), 0) ) ,{k, 1, Length(g)}) ) }, PlotRange -> {{-3,7}, {-1,9}} (* {L, R}, {B, T} *) ) (* single Rectangles, rotated around {0,0} by Pi/4 (45 degrees), with changing colour *) c = {Black, Red, Blue, Green, Magenta, Cyan, Yellow}; g = {{-3, 0}, {3, 6}}; (* diagonal of rectangle *) h = Replace(g, {{x1_, y1_}, {x2_, y2_}} -> {{x1, y1}, {x2, y1}, {x2, y2}, {x1, y2}, {x1, y1}}); g = {}; Do( x = Part(h, t, 1); y = Part(h, t, 2); r = Sqrt(x^2+y^2); a = ArcCos(x/r); g = Append(g, {N(Cos(a+\[Pi]/4)*r), N(Sin(a+\[Pi]/4)*r)}); , {t, Length(h)}); gPlot = Append({h}, g); (* original box & modified box *) Graphics({Part(c, 3), Line(Part(gPlot, 1)), Part(c, 2), Line(Part(gPlot, 2)) }, PlotRange -> {{-7,4}, {-3,7}} (* {L, R}, {B, T} *) ) (* shrinking Rectangles, rotated around {3,3} by Pi/12 (15 degrees), with changing colour *) c = {Black, Red, Blue, Green, Magenta, Cyan, Yellow}; gPlot = {}; For(t = 0, t < 6, t++, h = {{t/2, t/2}, {6-t/2, t/2}, {6-t/2, 6-t/2}, {t/2, 6-t/2}}; h = Append(h, Part(h, 1)); A = {{N(Cos(t*\[Pi]/12)), N(Sin(t*\[Pi]/12))}, {N(-Sin(t*\[Pi]/12)), N(Cos(t*\[Pi]/12))}}; R = h - 3; g = R.A + 3; gPlot = Join(gPlot, {g}) ); Graphics({Riffle(c, Table(Line(Part(gPlot, k)) ,{k, 1, Length(gPlot)}) ) }, PlotRange -> {{-3,7}, {-1,9}} (* {L, R}, {B, T} *) )