From 26bf7df5817d1df238698dc8f63e4543e746c7c1 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 13 Nov 2009 17:13:11 +0100 Subject: Solid angle stuff --- src/ewald.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ewald.c') diff --git a/src/ewald.c b/src/ewald.c index d543d98a..5be65644 100644 --- a/src/ewald.c +++ b/src/ewald.c @@ -30,6 +30,9 @@ void get_ewald(struct image *image) image->qvecs = malloc(image->width * image->height * sizeof(struct threevec)); + image->twotheta = malloc(image->width * image->height + * sizeof(double)); + for ( x=0; xwidth; x++ ) { for ( y=0; yheight; y++ ) { @@ -50,9 +53,12 @@ void get_ewald(struct image *image) qy = k * sin(twothetay); qz = k - k * cos(twotheta); + /* FIXME: Rotate vector here */ + image->qvecs[x + image->width*y].u = qx; image->qvecs[x + image->width*y].v = qy; image->qvecs[x + image->width*y].w = qz; + image->twotheta[x + image->width*y] = twotheta; } } -- cgit v1.2.3