diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-23 10:17:19 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-23 10:17:19 +0000 |
commit | 74d58e5f81c7b010aa4db3627f119f9df47c10fa (patch) | |
tree | 2feaa03cf28c7a420136dfb38fc3d7c720761e6c /src/reflections.c | |
parent | f1f7e3243ed291fa9276585f58f957c3f28d5212 (diff) |
Implement fast reprojection
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@72 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/reflections.c')
-rw-r--r-- | src/reflections.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reflections.c b/src/reflections.c index 03d901b..e16bcff 100644 --- a/src/reflections.c +++ b/src/reflections.c @@ -111,10 +111,10 @@ void reflection_add_from_dp(ControlContext *ctx, double x, double y, double tilt double tilt; double omega; double x_temp, y_temp, z_temp; - + tilt = 2*M_PI*(tilt_degrees/360); /* Convert to Radians */ omega = 2*M_PI*(ctx->omega/360); /* Likewise */ - + d = sqrt((x*x) + (y*y)); L = ctx->camera_length; theta = atan2(d, L); @@ -124,7 +124,7 @@ void reflection_add_from_dp(ControlContext *ctx, double x, double y, double tilt x_temp = r*sin(theta)*cos(psi); y_temp = -r*sin(theta)*sin(psi); /* Minus sign to define axes as y going upwards */ z_temp = r- r*cos(theta); - + /* Apply the rotations... First: rotate image clockwise until tilt axis is aligned horizontally. */ nx = x_temp*cos(omega) + y_temp*-sin(omega); |