Carbon and boron nitride nanotubes have been studied by transmission electr
on microscopy. Comparison between experiments and simulations showed contra
sts in the imaging mode, leading to a delicate evaluation of the diameter o
f the nanotubes ((dis)appearing fringes due to focus versus chirality of ro
pes of nanotubes) or to a misinterpretation of their real shape which can a
ppear as noncircular. Focus series are thus necessary to estimate the struc
tural parameters of nanotubes once discrepancies that appear between image
simulations arid experiments are understood. Electron diffraction was also
used to determine both the helicity and the diameter of nanotubes; simulati
ons fit the observations very well. In order to simulate the images of the
nanotubes, we have developed a program to calculate the atom coordinates. T
his program is presented here.