Skip to main content
Post Undeleted by Taiki
added 61 characters in body
Source Link
Taiki
  • 5.3k
  • 26
  • 34

* partial answerYou could translate the figure being rotated back and forth.

GeometricTransformation[g, RotationTransform[{u, v}, p]]

is sometimes equivalent to

Rotate[gTranslate[Rotate[Translate[g, VectorAngle[u-p], v]{u, v}], p]

For example,

u = {1, 0};
v = {1, 1/5};
p = {1/3, 1/3};
g = Rectangle[];
Graphics[GeometricTransformation[g, RotationTransform[{u, v}, p]], Axes -> True]
Graphics[Rotate[gGraphics[Translate[Rotate[Translate[g, VectorAngle[u-p], v]{u, v}], p], Axes -> True]

rotated rectangle

This works in both 2D and 3D.

* partial answer

GeometricTransformation[g, RotationTransform[{u, v}, p]]

is sometimes equivalent to

Rotate[g, VectorAngle[u, v], p]

For example,

u = {1, 0};
v = {1, 1/5};
p = {1/3, 1/3};
g = Rectangle[];
Graphics[GeometricTransformation[g, RotationTransform[{u, v}, p]], Axes -> True]
Graphics[Rotate[g, VectorAngle[u, v], p], Axes -> True]

rotated rectangle

You could translate the figure being rotated back and forth.

GeometricTransformation[g, RotationTransform[{u, v}, p]]

is equivalent to

Translate[Rotate[Translate[g, -p], {u, v}], p]

For example,

u = {1, 0};
v = {1, 1/5};
p = {1/3, 1/3};
g = Rectangle[];
Graphics[GeometricTransformation[g, RotationTransform[{u, v}, p]], Axes -> True]
Graphics[Translate[Rotate[Translate[g, -p], {u, v}], p], Axes -> True]

rotated rectangle

This works in both 2D and 3D.

Post Deleted by Taiki
Source Link
Taiki
  • 5.3k
  • 26
  • 34

* partial answer

GeometricTransformation[g, RotationTransform[{u, v}, p]]

is sometimes equivalent to

Rotate[g, VectorAngle[u, v], p]

For example,

u = {1, 0};
v = {1, 1/5};
p = {1/3, 1/3};
g = Rectangle[];
Graphics[GeometricTransformation[g, RotationTransform[{u, v}, p]], Axes -> True]
Graphics[Rotate[g, VectorAngle[u, v], p], Axes -> True]

rotated rectangle