# Table with an angle | rotate the co-ordintae

I have the following,

Flatten[MapAt[Reverse, 2]@
Table[{i, j}, {i, 0, 10, 10}, {j, 0, 90, 90}], 1]


that gives,

{{0, 0}, {0, 90}, {10, 90}, {10, 0}}


which are basically a rectangle coordinates, and shape will be is there anyway I can rotate the coordinates by 45 degree, so the shape will look like the following, You can achieve a rotation by using "GeometricTransformation" together with "RotationTransfrom". For your example we draw a line with the given coordinates:

dat = Flatten[
MapAt[Reverse, 2]@Table[{i, j}, {i, 0, 10, 10}, {j, 0, 90, 90}], 1];
dat = Append[dat, dat[]];
Graphics[{Line[dat]}] Now we rotate the shape:

rot = RotationTransform[-Pi/4];
Graphics[GeometricTransformation[Line[dat], rot]] To get the rotated coordinates, write:

rot[dat]

{{0, 0}, {45 Sqrt, 45 Sqrt}, {50 Sqrt,
40 Sqrt}, {5 Sqrt, -5 Sqrt}, {0, 0}}

• Thanks! I need to rotate the co-ordinates rather than the shape (GeometricTransformation).
– a019
May 25 at 12:07
• I added this part. May 25 at 12:13