# [Numpy-discussion] how to do scoring of random point to avoid overlapping in python

Pooja Gupta poojagupta.135 at gmail.com
Fri Oct 18 06:33:12 EDT 2013

```I have generated random point around a object and then evaluate each random
point on certain criteria. But problem is that every time I am getting new
point. How i can resolve this problem so that my result should be uniform.
Is any way to evaluate the position of random point.

for arang in range(1000):                # generate 1000 random point
around object
arang = arang + 1
x,y,z = 9.251, 24.410, 64.133       # coordinates of objects (i
have 500 object coordinates)

x1,y1,z1 = (uniform(x-3.5,x+3.5),uniform(y-3.5,y+3.5),uniform(z-3.5,z+3.5))
#randompoint
pacord = [x1,y1,z1]               #random point coordinates
dist_pap = euDist(uacoord, pacord)      # check distance between
object and random points

if  (dist_pap > 2.5):                   # if the random point far from obect
dist_pap1 = dist_pap
vecpw = euvector(uacoord, pacord)      # generate vectors b/w objject
and random point

# angle between angle between object and random point
num1 = np.dot (vect1, vecpw)
denom1 = np.linalg.norm(vect1) * np.linalg.norm(vecpw)
if 140 > ang1 >100:    # check angle
ang2= ang1print pacord

Queries
every time i am getting new result (new positions of the random
point). How to fix it.
on above basis I want to score each random point and the two random
point should be 2.5 distance apart from each other. How I can avoid
overlapping of the random points.

--
पूजा गुप्ता, पीएचडी
राष्ट्रीय कोशिका विज्ञान केंद्र

"जीवन को खुल कर मुस्कुराने दो, खोल दो बाहे अवसर आने दो ।
पग बढाओ हर पथ तुम्हारा है, पथ कंटक मंजिलो का इशारा है।।"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131018/91e8ee34/attachment.html>
```