From 0c6e7bb59501cc31ffe0cbbd54d7e82c1eaded12 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 12 Dec 2006 17:08:00 +0100 Subject: add lsq_funcs.max --- src/lsq_funcs.max | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/lsq_funcs.max (limited to 'src') diff --git a/src/lsq_funcs.max b/src/lsq_funcs.max new file mode 100644 index 0000000..8875a4e --- /dev/null +++ b/src/lsq_funcs.max @@ -0,0 +1,12 @@ +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))))$ + -- cgit v1.2.3