= Coordinate System = A '''coordinate system''' is a mapping of parameters to locations. <> ---- == Description == A coordinate system maps a set of coordinate parameters to a unique location. In 2 dimensions, the most common system is '''Cartesian''' coordinates (i.e., ''(x,y)''). Beyond this, there is also '''polar''' coordinates (i.e., ''(r,θ)'' where ''r'' is a radius and ''θ'' is an angle). In 3 dimensions, the most common system is '''rectangular''' coordinates (i.e., ''(x,y,z)''). Others include '''cylindrical''' coordinates (i.e., ''(r,θ,z)'') and '''spherical''' coordinates (i.e., ''(ρ,θ,φ)'' where ''ρ'' is the radial distance, ''θ'' is the '''azimuthal angle''', and ''φ'' is the '''polar angle'''). Azimuthal angles are measured as rotation around the polar axis. Polar angles are measured in comparison to the polar axis, and range from 0 to ''π'' (radians). Note that in some contexts, the roles of ''θ'' and ''φ'' are reversed. ---- == Changing System == === Polar to Cartesian === * ''x = r cos(θ)'' * ''y = r sin(θ)'' * The [[Calculus/JacobianMatricesAndDeterminants|Jacobian]] is given by ''J = r'', as in ''dA = dxdy = rdrdθ'' === Cartesian to Polar === * ''tan(θ) = y/x'' '''or''' ''θ = tan^-1^(y/x)'' * ''r^2^ = x^2^ + y^2^'' '''or''' ''r = √(x^2^ + y^2^)'' * ''J = 1/r'', as in ''dA = drdθ = (1/r)dxdy'' ---- === Cylindrical to Rectangular === * ''x = r cos(θ)'' * ''y = r sin(θ)'' * ''z = z'' * ''J = r'', as in ''dV = dxdydz = rdrdθdz'' === Rectangular to Cylindrical === * ''tan(θ) = y/x'' '''or''' ''θ = tan^-1^(y/x)'' * ''r^2^ = x^2^ + y^2^'' '''or''' ''r = √(x^2^ + y^2^)'' * ''z = z'' * ''J = 1/r'', as in ''dV = drdθdz = (1/r)dxdydz'' ---- === Spherical to Rectangular === Note that in some texts, ''θ'' and ''φ'' are reversed. Here ''φ'' is the polar angle and ''θ'' is the azimuthal angle. * ''x = ρ sin(φ) cos(θ)'' * ''y = ρ sin(φ) sin(θ)'' * ''z = ρ cos(φ)'' * ''J = ρ^2^ sin(φ)'', as in ''dV = dxdydz = ρ^2^ sin(φ) dρdθdφ'' === Rectangular to Spherical === * ''ρ^2^ = x^2^ + y^2^ + z^2^'' '''or''' ''ρ = √(x^2^ + y^2^ + z^2^)'' * ''tan(θ) = y/x'' '''or''' ''θ = tan^-1^(y/x)'' * ''cos(φ) = z/ρ = z/√(x^2^ + y^2^ + z^2^)'' '''or''' ''φ = cos^-1^(z/√(x^2^ + y^2^ + z^2^))'' ---- === Cylindrical to Spherical === Note that in some texts, ''θ'' and ''φ'' are reversed. Here ''φ'' is the polar angle and ''θ'' is the azimuthal angle. * ''ρ^2^ = r^2^ + z^2^'' '''or''' ''ρ = √(r^2^ + z^2^)'' * ''θ = θ'' * ''cos(φ) = z/ρ = z/√(r^2^ + z^2^)'' '''or''' ''φ = cos^-1^(z/√(r^2^ + z^2^))'' === Spherical to Cylindrical === * ''r = ρ sin(φ)'' * ''θ = θ'' * ''z = ρ cos(φ)'' ---- CategoryRicottone