# Chapter 3:Planes in Crystals¶

## Example 3.11 , Page no:61¶

In [1]:
import math
from __future__ import division

#given
h=3;
k=2;
l=1; #miller indices
a=4.2E-8; #in cm (lattice constant)

#calculate
d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing
d=d*1E8; #changing unit from cm to Angstrom

#result
print"The interplanar spacing is d=",round(d,2),"cm";
print"\t\t\t   d=",round(d,2),"Angstrom";

The interplanar spacing is d= 1.12 cm
d= 1.12 Angstrom


## Example 3.12 , Page no:61¶

In [2]:
import math
from __future__ import division

#given
h=1;k=1;l=1; #miller indices
a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )

#calculate
d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing

#result
print"The lattice spacing is d=",round(d,2),"Angstrom";

The lattice spacing is d= 1.26 Angstrom


## Example 3.15 , Page no:63¶

In [3]:
import math
from __future__ import division

#given
h=1;k=0;l=0; #miller indices
a=2.5; #in Angstrom (lattice constant)

#calculate
a=a*1E-10; #hence a is in Angstrom
d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing
p=d/a**3;

#result
print"The density is p=",round(p),"lattice points/m^2";

The density is p= 1.6e+19 lattice points/m^2