氫原子電子云模擬顯示

字號:

模擬了各種氫原子電子云的狀態(tài),希望對大家有所幫助??!
    # include "graphics.h"
    # include "math.h"
    # include "conio.h"
    # include "stdio.h"
    # define PI 3.14159
    # define THETA PI/8
    # define PHI PI*2/5
    # define L 800
    # define RR 80
    # define SQR(X,Y,Z) sqrt(X*X+Y*Y+Z*Z)
    int x1,y1;
    float n1(x,y,z) /*1s*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(16.0*exp(-r));
    }
    float n2(x,y,z) /*2s*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(16*(2-r)*exp(-r/2));
    }
    float n3(x,y,z) /*2pz*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(16*z*exp(-r/2));
    }
    float n4(x,y,z) /*2px*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(20*x*exp(-r/2));
    }
    float n5(x,y,z) /*2py*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(20*y*exp(-r/2));
    }
    float n6(x,y,z) /*3s*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(4*(27-18*r+2*r*r)*exp(-r/3));
    }
    float n7(x,y,z) /*3pz*/
    float x,y,z;
    {
    double r;
    r=SQR(x,y,z);
    return(4*(6-r)*z*exp(-r/3));
    }