diff options
-rw-r--r-- | src/lsq_cylindrical.mac | 14 | ||||
-rw-r--r-- | src/lsq_rectilinear.mac | 2 |
2 files changed, 7 insertions, 9 deletions
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)$ |