Message Boards Message Boards

0
|
7028 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

extract end points of rotated line ?

Posted 9 years ago
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

POSTED BY: john massucci
2 Replies

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.

POSTED BY: Gianluca Gorni

You really just want to create and use the RotationMatrix:

RotationMatrix[30 Degree].{0, 0}
RotationMatrix[30 Degree].{2, 0}
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract