From e6963a176230f9a39fc09e3619fe66459ba588a4 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 17 Dec 2006 16:32:43 +0100 Subject: implement LSQ based cylindrcal projection --- src/lsq_cylindrical.mac | 14 ++++++-------- src/lsq_rectilinear.mac | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/lsq_cylindrical.mac b/src/lsq_cylindrical.mac index 9a1d61a..09921eb 100644 --- a/src/lsq_cylindrical.mac +++ b/src/lsq_cylindrical.mac @@ -1,22 +1,20 @@ /* - * This is the basic pinhole projection model with distortion correction + * cylindrical projection model */ -x : tan(m_view - c_view)$ +x : m_view - c_view$ y : tan(c_nick - m_nick)$ x_rot : y * sin(c_tilt) + x * cos(c_tilt)$ y_rot : y * cos(c_tilt) - x * sin(c_tilt)$ -d : x_rot ^ 2 + y_rot ^ 2$ -dist_fact : d ^ 2 * k1 + d * k0$ -x_dist : x_rot * (1 + dist_fact) * scale$ -y_dist : y_rot * (1 + dist_fact) * scale$ +x_scale : x_rot * scale$ +y_scale : y_rot * scale$ /* * Some mangling for C code generation */ -x_expand : trigexpand(x_dist)$ -y_expand : trigexpand(y_dist)$ +x_expand : trigexpand(x_scale)$ +y_expand : trigexpand(y_scale)$ args: "(double c_view, double c_nick, double c_tilt, double scale, double k0, double k1, double m_view, double m_nick)"$ diff --git a/src/lsq_rectilinear.mac b/src/lsq_rectilinear.mac index 662680a..69a9642 100644 --- a/src/lsq_rectilinear.mac +++ b/src/lsq_rectilinear.mac @@ -1,5 +1,5 @@ /* - * This is the basic pinhole projection model with distortion correction + * rectilinear (pinhole) projection model with distortion correction */ x : tan(m_view - c_view)$ -- cgit v1.2.3