# Seed Randomize

Hi Community

At the moment Im working on a python code, that allows me to place points in a randomize way, with some constraings of limitations along a surface, aint that complex, however i believe because of the size of the surface and the amount of iterations somethings is getting wrong.

If you have any advise on how to clean the code, I will appreciate it.

Im feeding the code with a list of vectors, a point and a surface

# Enable Python support and load DesignScript library

import clr
from Autodesk.DesignScript.Geometry import *

import sys
py_path = r"C:\Program Files (x86)\IronPython 2.7\Lib"
sys.path.append(py_path)
import random
import math

# The inputs to this node will be stored as a list in the IN variables.

surface = IN[0]
stPoint = IN[1]
vectors = IN[2]

#Funciones de soporte
def vector():
return random.choice(vectors)

def area_circ(circles):
all_circles =
for i in circles:
all_circles.append(area)
return sum(all_circles)

# Place your code below this line

puntos =
circles =
puntos.append(stPoint)

``````area_surf = surface.Area

areas = area_circ(circles)

random.seed(2)
count = 0
while count < 10: #percentage
move_pt = Geometry.Translate(random.choice(puntos),vector(),cov)
if move_pt.DoesIntersect(surface) == True:
temp = []
for circle in circles:
if create_cir.DoesIntersect(circle) == True:
temp.append(0)
if create_cir.DoesIntersect(circle) == False:
temp.append(1)
if len(set(temp)) == 1:
puntos.append(move_pt)
circles.append(create_cir)
areas = area_circ(circles)
count += 1
if len(set(temp)) != 1:
temp = []
pass
else:
pass

return puntos, circles
``````