t = Rotate[Line[{{0, 0}, {2, 0}}], 30 Degree]
Graphics[{t}]
In the above example, can I extract then endpoints (coordinates) of the rotated line automatically, for later use in the program ?
regards,
Johin
t = Rotate[Line[{{0, 0}, {2, 0}}], 30 Degree]
Graphics[{t}]
In the above example, can I extract then endpoints (coordinates) of the rotated line automatically, for later use in the program ?
regards,
Johin
You really just want to create and use the RotationMatrix:
RotationMatrix[30 Degree].{0, 0}
RotationMatrix[30 Degree].{2, 0}
I am disappointed at the way Mathematica treats GeometricTransformation’s of graphic objects.
RegionQ[Line[{{0, 0}, {2, 0}}]]
gives True, so I would expect also
RegionQ[Rotate[Line[{{0, 0}, {2, 0}}], 30 Degree]]
to give True, but it does not. Also, a Line is a Region:
RegionQ[Line[{{0, 0}, {2, 0}}]]
but a rotated one is not:
RegionQ[Rotate[Line[{{0, 0}, {2, 0}}], 30 Degree]]
and, for example, I cannot discretize it. Also Normal has no useful effect on rotated graphics.
It seems to me that GeometricTransformation is only designed for immediate display. Perhaps the computations are not handled by the Kernel, but are made somewhere downstream.