summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-12 17:08:00 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-12 17:08:00 +0100
commit0c6e7bb59501cc31ffe0cbbd54d7e82c1eaded12 (patch)
treec6477180f4af5eb1273707ad69b054643bc39aa5 /src
parenta10646b1c87e6abc1651ae7160ddd2c7fd1753bc (diff)
add lsq_funcs.max
Diffstat (limited to 'src')
-rw-r--r--src/lsq_funcs.max12
1 files changed, 12 insertions, 0 deletions
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))))$
+