2
PolarPlot[Exp[θ], {θ, 0, 10}]  

I get plot as below:

spiral

If I need to rotate and move this object as below:

transformed spiral

What function can I use?

I ask this question because I need to know the general method to rotate and move object. I ask a similar question about ContourPlot, it seemed there's no general method for all plot function.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
kittygirl
  • 707
  • 4
  • 9

2 Answers2

7

If you use ParametricPlot[] instead, things are easier:

ParametricPlot[Composition[TranslationTransform[{-3000, -100}], RotationTransform[-120 °]][
               Exp[θ] AngleVector[θ]] // Evaluate, {θ, 0, 10}]

translated and rotated spiral

Note that multiplying your polar function with AngleVector[θ] (equivalently, {Cos[θ], Sin[θ]}) converts it into an equivalent form that can be used by ParametricPlot[].

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
3

I would say that it is not a good idea to try to apply geometric transformations to a Graphics object. One should better attack the geometric objects (the graphics primitives such as GraphicsComplex, Polygon, Line, Point, ...) inside a Graphics objects.

Let's start with the graphic you supplied. (Note that I specify a concise PlotRange in order to prevent myself from running into some problems with inconsistencies among the handling Options different plot types.)

g = PolarPlot[Exp[θ], {θ, 0, 10}, PlotRange -> {{-100, 100}, {-100, 100}}]

enter image description here

The relevant primitive here is Line as can be seen from the InputForm of g. In the following I Rotate anything that evaluates to True under RegionQ by Pi/3 about the point {0,0} and Translate it afterwards by {0,10}. Thanks to JEM_Mosig for pointing out that RegionQ can be used.

 g /. {x_?RegionQ :> Translate[Rotate[x, Pi/3, {0, 0}], {0,10}]}

enter image description here

This should work with slight modifications for arbitrary plot types (also 3D plots) and for all graphics primitives.

Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309