How can I move and rotate an object in an “infinity” or “figure 8” trajectory?

I know that the easiest way to move an object with the figure 8 trajectory is:

x = cos(t);
y = sin(2*t) / 2;


but I just don't know how to rotate it, lets says with a new variable r as rotation, how do I merge it into the above formula ? can anyone please advise me on what is the simplest and cheapest way/formula to move and rotate the figure 8 trajectory ?

The object should point in the direction of the derivative, which is [-sin(t), cos(2t)]. Its angle is atan2(cos(2t), -sin(t)).
To rotate the figure, choose an angle, θ, in radians, that you'd like the trajectory to be rotated. The position along this rotated figure is:
x = cos(θ) * cos(t) - sin(θ) * sin(2t)/2