summaryrefslogtreecommitdiff
path: root/1271/CH13/EX13.5/example13_5.sce
blob: 30c74806f0c95daf2aca88a2fa5c579a51494922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clc 
// Given that
x = 1 // intercepts cut by the plane along vector a of crystallographic axes
y = 2 // intercepts cut by the plane along vector b of crystallographic axes
k = 0 // raciprocal of intercepts cut by the plane along vector c of crystallographic axes
a = 5 // length of vector a of crystallographic axes in angstrom
b = 5 // length of vector b of crystallographic axes in angstrom 
c = 5 // length of vector c of crystallographic axes in angstrom
// Sample Problem 5 on page no. 13.26
printf("\n # PROBLEM 5 # \n")
printf("Standard formula used \n")
printf(" d = 1 / (x1^2 + y1^2 + z1^2)^1/2 \n")
x_ = 2 / x
y_ = 2 / y
z_ = 2 * k
d = a / sqrt(x_^2 + y_^2 + z_^2)
D=d^2
printf("\n Miller indices of the plane are (%d %d %d).\n Inter planar distance is sqrt(%d) angstrom.",x_,y_,z_,D)