def CalcCentre(data):
centre = array([0,0,0])
count = 0
for p in data:
centre = add(centre, array(p[:3]))
count += 1
centre = dot(1./count, centre)
return centre
Inshu 0 Newbie Poster
richieking 44 Master Poster
snippsat 661 Master Poster
Gribouillis commented: well spotted +13
Gribouillis 1,391 Programming Explorer Team Colleague
Inshu 0 Newbie Poster
Inshu 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.