Friday, August 14, 2015

Making a dielectric function using C++

To make a dielectric function that is compatible with FPS use the following code as an example:

In this example we define a sphere with radius of R, refractive index of "refractive_index" and located at point (i0,j0,k0) in a cubic domain of free space


 

for (int i=0; i<i_max;i++){
    for (int j=0; j<j_max; j++){
        for(int k=0; k<k_max;k++){
           if((pow(i-i0,2.0) + pow(j-j0,2.0) + pow(k-k0,2.0)) <= pow(R,2.0)){
               epsilon[i][j][k] = pow(refractive_index,2.0);
}
}
}
}

7 comments:

  1. I am happy to find this post Very useful for me, as it contains lot of information

    Article submission sites
    Technology

    ReplyDelete
  2. Thanks for giving an Excellent Blog, it's very useful information to us, keep on it doing like this, I eagerly waiting for your updates, Thank you So much...
    Best Aviation Training Institute in Chennai

    ReplyDelete
  3. Amazing article i liked the information you shared for gaming i want to ask what your gaming taste is about if you like FPS game why not to go for this blog.

    ReplyDelete
  4. The students get a detailed study on Hadoop and an opportunity of working on live projects in order to make themselves job ready. data science course in hyderabad

    ReplyDelete
  5. Wonderful article, very useful and well explanation. Your post is extremely incredible. otherwise anyone want to learn CATIA V5 Course so contact here- +91-9311002620 or visit website- https://www.htsindia.com/Courses/cad-cam-cae/autocad-catia-v5-training-course-center

    ReplyDelete