diff options
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); |