# How do I rotate a curve?

I have a circular segment defined as:

    ParametricPlot[5 {Sin[ϕ], 1 - Cos[ϕ]}, {ϕ, -0.2, 0.8},
PlotRange -> All]


which I have to rotate around point 5 {Sin[0.8], 1 - Cos[0.8]} for 0.3 radians and I don't know how to do it.

I tried with Rotate which is not what I needed, because it rotates the whole graphics - axes included. I only want to rotate the circular segment. I had a strong feeling that I should use RotationMatrix and so I tried that too:

ParametricPlot[5*RotationMatrix[0.3].{Sin[ϕ], 1 - Cos[ϕ]}, {ϕ, -0.2, 0.8}, PlotRange -> All]


but here the output is the plot rotated around the origin. But If I try to rotate around a certain point

RotationMatrix[0.3,5 {Sin[.8], 1 - Cos[.8]}]


I get an error saying that the dimensions are wrong. What can I do to rotate the curve?

There's actually a built in function RotationTransform for that:

rotation = RotationTransform[0.3, fixedpoint];

ParametricPlot[{5 {Sin[ϕ], 1 - Cos[ϕ]},
rotation[5 {Sin[ϕ], 1 - Cos[ϕ]}]}, {ϕ, -0.2, 0.8},
PlotRange -> All]


As it says here, to rotate about a fixed point, you first translate that point to the origin, apply the rotation matrix, then reverse the translation.

rotateparametric[parfunc_, fixedpoint_, angle_] :=
RotationMatrix[angle].(parfunc - fixedpoint) + fixedpoint;

ParametricPlot[{5 {Sin[ϕ], 1 - Cos[ϕ]},
rotateparametric[5 {Sin[ϕ], 1 - Cos[ϕ]}, fixedpoint,0.3]},
{ϕ, -0.2, 0.8}, PlotRange -> All]


• Thank you, big time! This works nicely! – skrat Sep 11 '15 at 8:16
• @skrat I just edited it to make a function, so that you can easily do this to any 2D parametric function. – Jason B. Sep 11 '15 at 8:21