(Jan-19-2017, 08:21 PM)micseydel Wrote: What have you tried? Do you have a specific question?
I have tried to implement this, but it won't compile
### [1,3] :vx (holes) def cuts(x,y,L,h): for i in range(nrg): if vx[i] > x and vx[i] < x+L and vy[i] > y and vy[i] <y+h: found = True break if found: 1: couts(x,y,L-vx[i],h) 2: cuts(vx[i],y,L-vx[i]+x,h) 3: cuts(L-vx[i],y,L-vx[i],h) 4: cuts(x,h-y,L,h-y) else: ar = L*h if ar > arMax: arMax = ar nrg = 2 vx[1] = [1,3] vx[2] = [2,3] [x,y,L,h] sol[0] = x sol[1] = y sol[2] = L sol[3] = h