Vampire-js / fractal-trees

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image

Polar Coordinates

In terms of the angle , a point on a unit circle can be written as $(cosθ , sinθ)$. For a general circle with center at a point $(a,b)$ , the coordinates can be written as $(a + rcosθ , b + rsinθ)$

Rotation of axes


This is the formula used to find the new coordinates of a point, when the entire coordinate axes system is rotated by an angle $θ$

Extra info: The proof of that formula

image To prove this, we will use Complex Numbers Let $z$ be a complex number representing the point B. Let the point B make angle $α$ with the origin x axis. Hence, we can write $z = re^(iα)$ So, in the new set of axes, $z' = re^(i(α - θ))$

$re^(iθ) = rcosθ + risinθ$ So, $z' = rcos(α - θ) + risin(α - θ)$ We know that $cos(α - θ) = cos(α)cos(θ) + sin(α)sin(θ) $ Also we know that if B has coordinates $(x,y)$ , $z=x + iy$, Implying $x = rcos(θ)$ and $y = rsin(θ)$

Hence, if $z' = rx' + riy'$ , $x' = xcos(α) + ysin(α)$

Similarly we can prove that $y' = ycos(α) - xsin(α)$ Further, this can be written in matrix form to get the equation :)

About


Languages

Language:JavaScript 87.4%Language:HTML 11.2%Language:CSS 1.4%