algorithmic modeling for Rhino
import random
L=[];x=0
while x<2: #‘2’can be changed.
L1=[17,24,18]
L2=[]
for i in range(len(L1)):
if L1[i]%2==1:
L2.append(L1[i]/2-0.5)
L2.append(L1[i]/2+0.5)
else:
L2.append(L1[i]/2)
L2.append(L1[i]/2) #it will get 'L2=[8,9,12,12,9,9]'
x+=1 #i dont know how to replace the L2 to L1 ,realize the loop.
print(L2)
do loop like this:
when 'x<2',get the list [8,9,12,12,9,9],when 'x<3',get the list [4,4,4,5,6,6,6,6,3,3,3,3]
finally,L.append('all the list'),get the L=[[17,24,18],[8,9,12,12,9,9],[4,4,4,5,6,6,6,6,3,3,3,3]...and so on....]
-Carcassi
Tags:
Welcome to
Grasshopper
Added by Parametric House 1 Comment 0 Likes
Added by Parametric House 1 Comment 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2026 Created by Scott Davidson.
Powered by