From e4bf7c9dec362739678689d87126c8df490ddb08 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Tue, 12 Dec 2006 19:19:00 +0100 Subject: try to get display working --- src/ProjectionTangentialLSQ.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/ProjectionTangentialLSQ.cxx') diff --git a/src/ProjectionTangentialLSQ.cxx b/src/ProjectionTangentialLSQ.cxx index 6ae7757..a05c990 100644 --- a/src/ProjectionTangentialLSQ.cxx +++ b/src/ProjectionTangentialLSQ.cxx @@ -18,6 +18,8 @@ static double sec(double a) { #include "lsq_funcs.c" +static double k0 = 1.0, k1 = 0.0; + static double comp_tilt(double tan_nick_view, double tan_dir_view, double n_scale, double tan_nick_m, double tan_dir_m, @@ -143,14 +145,9 @@ ProjectionTangentialLSQ::optimize(const Hill *m1, const Hill *m2, ViewParams *pa void ProjectionTangentialLSQ::get_coordinates(double a_view, double a_nick, const ViewParams *parms, double *x, double *y) { - double x_tmp, y_tmp; - - x_tmp = tan(a_view) * parms->scale; - y_tmp = - (tan(a_nick - parms->a_nick) * parms->scale); - // rotate by a_tilt; - *x = x_tmp * cos(parms->a_tilt) - y_tmp * sin(parms->a_tilt); - *y = x_tmp * sin(parms->a_tilt) + y_tmp * cos(parms->a_tilt); + *x = mac_x(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, -a_nick); + *y = mac_y(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, -a_nick); } double -- cgit v1.2.3