Transforms
Coordinate System Transforms
Scalar Transforms
Vector Transforms
For certain magnetic sources, like a sphere or solenoid, their field equations are more conveniently written in non-cartesian coordinates. The resulting vector fields then need to be transformed back into cartesian coordinates of the form \(\mathbf{B} = B_x \mathbf{\hat{x}} + B_y \mathbf{\hat{y}} + B_z \mathbf{\hat{z}}\) or \(\mathbf{B} = B_x \mathbf{\hat{x}} + B_y \mathbf{\hat{y}}\).
Polar to Cartesian
\(\mathbf{B} = B_r \mathbf{\hat{r}} + B_\phi \mathbf{\hat{\phi}}\)
Cylindrical to Cartesian
\(\mathbf{B} = B_r \mathbf{\hat{r}} + B_\phi \mathbf{\hat{\phi}} + B_h \mathbf{\hat{h}}\)
For a solenoid or cylinder \(B_\phi = 0\), thus:
Spherical to Cartesian
\(\mathbf{B} = B_r \mathbf{\hat{r}} + B_\theta \mathbf{\hat{\theta}} + B_\phi \mathbf{\hat{\phi}}\)
Misc
The centroid of a non-self-intersecting closed polygon defined by \(n\) vertices, is the point (\((C_x, C_y)\) where
and
where \(A\) is the polygon's signed area:
Also written as:
For a convex polygon, if \(A > 0\) the vertices are listed in counter-clockwise order, and clockwise if \(A < 0\).