I've been wondering about how people seem to rotate graphs on a 2D area, and came across this Desmos 2D graph, found Here (desmos.com). Once I saw this, I looked at the equations and was blown by the complexity to rotate them with different variables ($a$, $b$, and $c$). An example of the one of the equations of the points, which are cartesian in the format of $(x,y)$:
$\left(\cos (u)\cos (v)-\sin (u)\cos (v)+\sin (v),\sin (u)\sin (w)-\cos (u)\sin (v)\cos (w)+\sin (u)\sin (v)\cos (w)+\cos (u)\sin (w)+\cos (v)\cos (w)\right)$
Quite the long equation to find a point- but understandable. I'm just interested in knowing the mathematical reasoning behind him using the functions to find the location of the points, not the lines (They are just connecting multiple points). Is this related to the rotation matrix in any way? Or is it using something else that I could possibly know the name of so I could pursue future research? Thanks!
2026-03-31 22:51:43.1774997503
What method did this person use to rotate the points in 2D Space to imitate 3D Rotation?
350 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
Set all parameters $a, b, c$ to $0$ and then you get a square on the $xy$ plane with vertices at $(\pm 1, \pm 1$). Imagine that this is what you see when you look at a cube in $\mathbb{R}^3$ whose vertices are $(\pm 1, \pm 1, \pm 1)$ "from above" (that is, from the $z$ axis to the $xy$ plane). From this perspective, the upper face of the cube (with vertices $(\pm 1, \pm 1, 1)$) completely hides away the lower face of the cube (with vertices $(\pm 1, \pm 1, -1)$) and so you can only see a square.
Now, if you change the $b$ parameter (where $b = \pi v$), the square gets rotated on the $xy$ plane. This corresponds to rotating the cube around the $z$-axis. Changing the $a$ parameter (where $a = \pi u$) corresponds to rotating the cube around the $y$ axis and changing the $c$ parameter (where $c = \pi w$) corresponds to rotating the cube around the $x$ axis. Each such rotation can be done by multiplication with an appropriate rotation matrix. In this case, a possible formula for transforming a point $(x,y,z)^T$ is given by
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \mapsto \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos w & \sin w \\ 0 & -\sin w & \cos w \end{pmatrix} \begin{pmatrix} \cos v & \sin v & 0 \\ -\sin v & \cos v & 0 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} \cos u & 0 & -\sin u \\ 0 & 1 & 0 \\ \sin u & 0 & \cos u \end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix} \\ = \begin{pmatrix} \cos u \cos v & \sin v & -\cos v \sin u \\ \sin u \sin w - \cos u \cos w \sin v & \cos v \cos w & \cos w \sin u \sin v + \cos u \sin w \\ \cos w \sin u + \cos u \sin v \sin w & -\cos v \sin w & \cos u \cos w - \sin u \sin v \sin w\end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix}. $$
This corresponds to performing first a rotation in the $xz$ plane, then a rotation in the $xy$ plane and finally a rotation in the $yz$ plane (and this is indeed the formula the application uses).
We look at the picture from above and so we are interested only in the $xy$-components of the result giving us
$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} \mapsto \begin{pmatrix} x \cos u \cos v + y \sin v - z \cos v \sin u \\ x (\sin u \sin w - \cos u \cos w \sin v) + y \cos v \cos w + z (\cos w \sin u \sin v + \cos u \sin w )\end{pmatrix}. $$
For example, point number $7$ in the application correspond to the vertex $(1,1,1)$ of the cube. Hence, the formula for changing $(1,1,1)$ in terms of $u,v,w$ is given by
$$ \begin{pmatrix} \cos u \cos v + \sin v - \cos v \sin u \\ \sin u \sin w - \cos u \cos w \sin v + \cos v \cos w + \cos w \sin u \sin v + \cos u \sin w \end{pmatrix} $$
which is the formula you wrote in the question.
To summarize, the person who wrote the application considered a cube in 3D and projected it (orthogonally) to the $xy$ plane (2D). By modifying three parameters, you can rotate the vertices and edges of the cube in 3D and see the projected result in 2D.