پرش به محتوا

پرونده:Reciprocal monoclinic lattice.png

محتوای صفحه در زبان‌های دیگر پشتیبانی نمی‌شود
از ویکی‌پدیا، دانشنامهٔ آزاد

Reciprocal_monoclinic_lattice.png(۵۱۶ × ۳۱۸ پیکسل، اندازهٔ پرونده: ۱۲۶ کیلوبایت، نوع MIME پرونده: image/png)

خلاصه

توضیح
English: The Fourier transform of a monoclinic lattice with real-space vectors a = (1, 0, 0), b = (0, 1, 0), c = (0.5, 0, 0.8). (These vectors are arbitrary.) A 12×12×12 lattice of delta functions was used. The reciprocal lattice vectors are marked on in black.
تاریخ
منبع اثر شخصی
پدیدآور GKFX

Generating code

Data points for this file were created with the following code:

#include <complex.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

typedef struct {
    double x, y, z;
} vector;

static inline vector mult_sv(double scalar, vector vec) {
    vector r = { scalar * vec.x, scalar * vec.y, scalar * vec.z };
    return r;
}

static inline vector add_vvv(vector v1, vector v2, vector v3) {
     vector r = {
         v1.x + v2.x + v3.x,
         v1.y + v2.y + v3.y,
         v1.z + v2.z + v3.z };
     return r;
}

static inline double dot_vv(vector v1, vector v2) {
    return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
}

static inline int cube(int n) { return n*n*n; }

vector a = {1.0, 0.0, 0.0};
vector b = {0.0, 1.0, 0.0};
vector c = {0.5, 0.0, 0.8};
double meshStepLen = 10.0/64.0;
int nPerSide = 12;
int meshSideN = 100;

/*
 * The Fourier transform of δ(x - a, y - b, z - c) is
 *     exp(i(aX + bY + cZ))
 *     --------------------
 *          (2√2)(√π)³
 * using Mathematica's default definition of FT.
 */
double complex FTDD(vector realDDPos, vector reciprPos) {
    return cexp(I * dot_vv(realDDPos, reciprPos)) /
        (M_SQRT2 * M_2_SQRTPI * M_PI * M_PI);
}

int main() {
    // Make progress bar work.
    setvbuf (stdout, NULL, _IONBF, BUFSIZ);

    vector *directLattice = (vector*) malloc(cube(nPerSide)*sizeof(vector));
    {
        vector *directLatticeTmp = directLattice;
        for (int i = 0; i < nPerSide; i++) {
            for (int j = 0; j < nPerSide; j++) {
                for (int k = 0; k < nPerSide; k++) {
                    directLatticeTmp[0] = add_vvv(mult_sv(i, a), mult_sv(j, b), mult_sv(k, c));
                    directLatticeTmp++;
                }
            }
        }
    }

    double complex *reciprocalLattice = (double complex*) malloc(cube(meshSideN)*sizeof(double complex));
    for (int i = 0; i < cube(meshSideN); i++) {
        reciprocalLattice[i] = 0.0;
    }

    {
        double complex *reciprocalLatticeTmp = reciprocalLattice;

        for (int i = 0; i < meshSideN; i++) {
            putchar('.');
            for (int j = 0; j < meshSideN; j++) {
                for (int k = 0; k < meshSideN; k++) {
                    vector imagPoint = { i*meshStepLen, j*meshStepLen, k*meshStepLen };
                    for (int l = 0; l < cube(nPerSide); l++) {
                        reciprocalLatticeTmp[0] += FTDD(directLattice[l], imagPoint);
                    }
                    reciprocalLatticeTmp++;
                }
            }
        }
    }
    printf(" Created complex lattice\n");

    double *magData = (double*) malloc(cube(meshSideN)*sizeof(double));
    for (int i = 0; i < cube(meshSideN); i++) {
        magData[i] = cabs(reciprocalLattice[i]);
    }
    FILE *datafile = fopen("rlattice.bin", "wb");
    if (!datafile) {
        perror(0);
        goto free_rlattice;
    }
    fwrite(magData, sizeof(double)*cube(meshSideN), 1, datafile);
    fclose(datafile);

    printf("\nDone.\n");

free_rlattice:
    free(reciprocalLattice);
    free(directLattice);
    return 0;
}

It was then plotted in Mathematica.

اجازه‌نامه

من، صاحب حقوق قانونی این اثر، به این وسیله این اثر را تحث اجازه‌نامهٔ ذیل منتشر می‌کنم:
Creative Commons CC-Zero این پرونده تحت CC0 1.0 Universal Public Domain Dedication کریتیو کامنز قابل دسترسی است.
کسی که اثری را با این سند همراه کرده است، با چشم‌پوشی از تمام حقوق خود نسبت به اثر در جهان تحت قانون کپی‌رایت و همهٔ حقوق قانونی مرتبط یا همسایه‌ای که او در اثر داشته است، تا حد مجاز در قانون، آن را به مالکیت عمومی اهدا کرده است. شما می‌توانید بدون گرفتن اجازه این اثر را تکثیر کنید، تغییر دهید، منتشر کنید یا دوباره ایجاد کنید، حتی اگر مقاصد تجاری داشته باشید.

عنوان

شرحی یک‌خطی از محتوای این فایل اضافه کنید

آیتم‌هایی که در این پرونده نمایش داده شده‌اند

توصیف‌ها

این خصوصیت مقداری دارد اما نامشخص است.

source of file انگلیسی

تاریخچهٔ پرونده

روی تاریخ/زمان‌ها کلیک کنید تا نسخهٔ مربوط به آن هنگام را ببینید.

تاریخ/زمانبندانگشتیابعادکاربرتوضیح
کنونی‏۳۱ اکتبر ۲۰۱۹، ساعت ۲۳:۱۱تصویر بندانگشتی از نسخهٔ مورخ ‏۳۱ اکتبر ۲۰۱۹، ساعت ۲۳:۱۱۵۱۶ در ۳۱۸ (۱۲۶ کیلوبایت)GKFX{{Information |description ={{en|1=The Fourier transform of a monoclinic lattice with real-space vectors '''a''' = (1, 0, 0), '''b''' = (0, 1, 0), '''c''' = (0.5, 0, 0.8). (These vectors are arbitrary.) A 12×12×12 lattice of delta functions was used.}} |date =2019-10-31 |source ={{own}} |author =User:GKFX }} Category:Reciprocal lattice Category:X-ray diffraction

صفحه‌های زیر از این تصویر استفاده می‌کنند:

کاربرد سراسری پرونده

ویکی‌های دیگر زیر از این پرونده استفاده می‌کنند:

فراداده