How does this parametric equation rotate functions in Desmos?

683 Views Asked by At

In this website (https://vondesmos.wordpress.com/2016/01/28/rotating-a-function/), there is a parametric equation $(t\cdot\cos a - f(t)\cdot\sin a, t\cdot\sin a + f(t)\cdot\cos a)$ that, after inputting a function in a previous line, allows you to replicate and rotate that function (or rather the graph of the function). However, there's no explanation for how this equation is derived, and that's what I'm currently looking for, for usage in a maths project.

I can sort of begin to understand how this works based off some other answers, but I can't comprehend it fully and I'd like to know how it works. Apologies if this has been answered somewhere in some form before - it's hard to find out whether it has been or not, as I'm not familiar with most of these terms and there seem to be many different ways of talking about it in general.

1

There are 1 best solutions below

0
On BEST ANSWER

If you want to rotate the point $(x,y)$ by an angle $\theta$ then the following linear transformation will implement it.

$$ x' = \cos(\theta) x + \sin(\theta) y, $$ $$y' = -\sin(\theta) x + \cos(\theta) y, $$

This transformation can be derived using trigonometry.

Now think of the points on the curve defined by $y=f(x)$. Each point is of the form $(x,f(x))$ or equivalently $(t,f(t))$. Now substitute into the rotation formula given above $x=t$ and $y=f(t)$.

$$ x' = \cos(\theta) t + \sin(\theta) f(t), $$ $$y' = -\sin(\theta) t + \cos(\theta) f(t), $$

The new rotated point has coordinates $\Big(\cos(\theta) t + \sin(\theta) f(t), -\sin(\theta) t + \cos(\theta) f(t)\Big)$.

If you want to change the direction of the rotation replace $\theta$ with $-\theta$. Doing so will give us.

$$\Big(\cos(\theta) t - \sin(\theta) f(t), \sin(\theta) t + \cos(\theta) f(t)\Big)$$