diff options
author | Thomas White <taw@physics.org> | 2011-08-02 16:01:14 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:35 +0100 |
commit | 7d294dca8bbf4a464cabb058d8ea68f759441481 (patch) | |
tree | c7deda42f9fc4abe034888c2c07af8936b7b2a9c /src | |
parent | ee25b4c412c3759158eae3153170cb7940aee143 (diff) |
render_hkl: Fix "squashed zone axes"
Diffstat (limited to 'src')
-rw-r--r-- | src/render_hkl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c index 50450a94..a3cd48c6 100644 --- a/src/render_hkl.c +++ b/src/render_hkl.c @@ -94,9 +94,13 @@ static void draw_circles(double xh, double xk, double xl, Reflection *refl; RefListIterator *iter; SymOpMask *m; + double nx, ny; m = new_symopmask(sym); + nx = xh*xh + xk*xk + xl*xl; + ny = yh*yh + yk*yk + yl*yl; + /* Iterate over all reflections */ for ( refl = first_refl(list, &iter); refl != NULL; @@ -121,8 +125,8 @@ static void draw_circles(double xh, double xk, double xl, /* Is the reflection in the zone? */ if ( h*zh + k*zk + l*zl != 0 ) continue; - xi = h*xh + k*xk + l*xl; - yi = h*yh + k*yk + l*yl; + xi = (h*xh + k*xk + l*xl) / nx; + yi = (h*yh + k*yk + l*yl) / ny; switch ( wght) { case WGHT_I : |