x_undist_unrot : TAN(m_view - c_view) * scale$ y_undist_unrot : TAN(m_nick - c_nick) * scale$ d : y_undist_unrot ^ 2 + x_undist_unrot ^ 2$ dist_fact : d ^2 * k1 + d * k0$ x_unrot : x_undist_unrot * dist_fact$ y_unrot : y_undist_unrot * dist_fact$ x : y_unrot * SIN(c_tilt) + x_unrot * COS(c_tilt)$ y : y_unrot * COS(c_tilt) - x_unrot * SIN(c_tilt)$ x_expand : trigexpand(x)$ y_expand : trigexpand(y)$ SPRINT("out_x = ", STRING(DIFF(x_expand, TAN(c_view))))$