I have a little problem to solve .. i have a array with x, y, z co-ordinates in it as a tuple. I am trying to find the distance between each point and sorting the points according to the min distance. Can soemone help me with the algorithm ??
Start by printing x, y, and z. And print the return. These are always good places to start. def calcdist(data): for p in data: x = p[:1] y = p[:2] z = p[:3] print "x, y, and z =", x, y, z for i in range(len(data)): dist = sqrt((x[i]-x[i+1])^2 + … Read More
Edited by woooee