I am reading a file with 4 columns (índex and 3 coordinates) and I want to plot spheres at these positions:
data = Import["positions.txt", "Table"];
ballspec = {1.*#1, {#2, #3, #4}} & @@@data[[All, 1 ;; 4]];
plot = Graphics3D[{RGBColor[#3], {Opacity[.7],
Sphere[{#2}, .25]}} & @@@ ballspec, Axes -> False];
Show[plot]
but I would also like to add lines connecting the nearest neighbor points, how could I proceed?