Skip to content

Relabel angles

Tim Starling requested to merge work/tstarling/phi into main

Simplify the vertical coordinate calculation by inverting the order of the coordinates and eliminating the (pi - phi) adjustment. This causes the definition of phi to agree with what the relevant Wikipedia article calls the "mathematics convention" for spherical coordinates, where phi=0 means that a point is on the z axis, not on the x-y plane.

It may make the code slower -- it executes 1% more instructions. But it's easier to verify that the vertical coordinate stays within the top bound, i.e. input image row >= 0. The performance could be fixed some other way if we needed to do that.

Relabel theta as "psi" to make it clear that we are not following the conventional definition of theta, which is an angle measured from the x axis.

Merge request reports