I wanted to try and use a 2x2 rotation matrix for the same. Define a 2x2 rotation matrix and then use this defined function inside Animate to rotate the Rectangle
Is there any way to do that?
Is there any way that i can rotate this rectangle without using Geometric Transformation?
Say, multiply every end coordinate of the rectangle with the function defined for the rotation matrix?
Multiply every end coordinate with rot [a] where rot[a] := {{Cos[a], -Sin[a]}, {Sin[a], Cos[a]}}; ?
It can be shortened to an almost one-liner:
Animate[Graphics[Rotate[Rectangle[{-2.5, -0.5}, {2.5, 0.5}], a], Axes -> True, PlotRange -> 10], {a, 0, 2 \[Pi]}]
may be
ClearAll[rot,a] rot[a_] := {{Cos[a], -Sin[a]}, {Sin[a], Cos[a]}}; R0 = Rectangle[{-2.5, -0.5}, {2.5, 0.5}]; Animate[Graphics[GeometricTransformation[R0, rot[a]], Axes -> True, PlotRange -> {{-10, 10}, {-10, 10}}], {a, 0, 2 \[Pi]}]