summaryrefslogtreecommitdiff
path: root/src/lsq_rectilinear.mac
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-21 19:58:47 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-21 19:58:47 +0200
commit4f544f1ab0d04a4b18fac5e9bec0e869b981f038 (patch)
treee155b494bf848e10c369527ac5dff12cff98a0d0 /src/lsq_rectilinear.mac
parent7669bc038012eb92bd8d3ae842b236cd406ed074 (diff)
fixes to cartesian rotation
Diffstat (limited to 'src/lsq_rectilinear.mac')
-rw-r--r--src/lsq_rectilinear.mac16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lsq_rectilinear.mac b/src/lsq_rectilinear.mac
index e439d09..bd0a4f9 100644
--- a/src/lsq_rectilinear.mac
+++ b/src/lsq_rectilinear.mac
@@ -14,25 +14,25 @@ c_z_rot1 : c_z$
c_x_rot2 : c_x_rot1$
c_y_rot2 : cos(c_nick) * c_y_rot1 - sin(c_nick) * c_z_rot1$
c_z_rot2 : sin(c_nick) * c_y_rot1 - cos(c_nick) * c_z_rot1$
-
-c_x_rot2 : cos(c_nick) * c_x_rot1$ + sin(c_nick) * c_z_rot1$
-c_y_rot2 : c_y_rot1$
-c_z_rot2 : -sin(c_nick) * c_x_rot1 + cos(c_nick) * c_z_rot1$
*/
-a_h : c_nick - (\pi/2 - acos(c_z))$
-a_v : atan(c_y / c_x)$
+c_x_rot : cos(c_nick) * c_x$ + sin(c_nick) * c_z$
+c_y_rot : c_y$
+c_z_rot : -sin(c_nick) * c_x + cos(c_nick) * c_z$
+
+a_h : (\pi/2 - acos(c_z_rot))$
+a_v : atan(c_y_rot / c_x_rot)$
/* angle over horizon in view direction */
-/* a_h : atan (tan (m_nick) * sqrt(tan(m_view - c_view) ^2 + 1))$ */
+a_h_dir : atan (tan (a_h) * sqrt(tan(a_v) ^2 + 1))$
/* adjust angle according to nick value */
/* a_v : atan(cos(c_nick - a_h ) * tan((m_view - c_view) / cos(a_h)))$ */
/* a_v : m_view - c_view$ */
x : tan(a_v)$
-y : tan(a_h)$
+y : tan(-a_h_dir)$
x_rot : y * sin(c_tilt) + x * cos(c_tilt)+x0$
y_rot : y * cos(c_tilt) - x * sin(c_tilt)$
d : x_rot ^ 2 + y_rot ^ 2$